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

Make selectXpath simpler to use by disabling namespaces #1801

Closed
jhy opened this issue Jul 3, 2022 · 1 comment
Closed

Make selectXpath simpler to use by disabling namespaces #1801

jhy opened this issue Jul 3, 2022 · 1 comment
Assignees
Milestone

Comments

@jhy
Copy link
Owner

jhy commented Jul 3, 2022

Current, Element#selectXpath() has namespace awareness for its queries. However, this makes selecting anything from a document with an xmlns attribute set a pain, and expressions end up looking like: //*[local-name()="input"]. See #1746 for an example of the problems this causes.

It will be an improvement to disable namespaces when used in the Element#selectXpath() method. If users really want to use XPath with namespaces they can still use the W3CDom factory, which then also gives the path to registering namespace URI handlers.

@jhy jhy added the improvement label Jul 3, 2022
@jhy jhy self-assigned this Jul 3, 2022
@jhy jhy added this to the 1.15.2 milestone Jul 3, 2022
@jhy
Copy link
Owner Author

jhy commented Jul 3, 2022

Completed by 2b573de

@jhy jhy closed this as completed Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant