xpath
xpath copied to clipboard
stateful interface is cumbersome when performing multiple xpath queries on one document
as far as i can tell, the only way to do this is to create a new NodeNavigator with htmlquery.CreateXPathNavigator for each query.
additionally, it is cumbersome to turn the result of a query into a string. having to iterate through to find the first result, and then calling Value() seems like a lot, and there is no documentation i could find that suggests this is what you are supposed to do.
htmlquerydepend on the thirdy package golang html, it don't provide a 'Value()' method. one way is wrapper ahtml.Nodeto the new class it providesValue()andAttrs()these methods.