moovweb/gokogiri

xmlNode.Search returns no results when XPath evals to string or number

Closed this issue · 1 comments

The current implementation of Search assumes that a NodeSet was returned, and returns nothing if the XPath actually evaluates to a string or number.

Search should either return an interface{} and require type switching, or an error should be returned if not a NodeSet. Alternatively a new API that returns an interface{} can be introduced.

Pull request #44 addresses this by introducing the more useful xmlNode.EvalXPath