Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stateful interface is cumbersome when performing multiple xpath queries on one document #87

Open
lolbinarycat opened this issue Apr 5, 2023 · 1 comment

Comments

@lolbinarycat
Copy link

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.

@zhengchun
Copy link
Contributor

  1. htmlquery depend on the thirdy package golang html, it don't provide a 'Value()' method. one way is wrapper a html.Node to the new class it provides Value() and Attrs() these methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants