-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Added support for XPath 1.0 #80
Conversation
Closes jhy#6.
…. Overriding implementations in Element still return Element.
…, and to change many at once with Elements.tagName(String).
… queries (e.g. "meta[http-equiv], meta[content]") were being parsed incorrectly as OR only queries (e.g. former as "meta, [http-equiv], meta[content]") Fixed issue where a content-tye specified in a meta tag may not be reliably detected, due to the above issue.
…o match browser parse trees.
… first output element.
Fixes jhy#63
…eeded by an irrelevant <meta> tag.
No one working on xpath support? |
The performance of CSS locator (selector) is significantly faster than Xpath. For your reference: In my test with HTMLUnit (using XPath) and Jsoup (using CSS locator), the result also shows the same! [Testing Log]Parsing E:/profiling.html using Xpath ... Searching doc by HTMLUnit ... Parsing E:/profiling.html using CSS Selector ... Searching doc by Jsoup ... I think Jsoup is already good enough by supporting CSS locator! |
Thanks. My requirement is simple. Getting xpath or css selector in browser, |
Hi riczhao, The equivalent expression of "tag[1]" in CSS Selector is "tag:nth-child(1)". |
Hello, Please document that JSoup does not currently support XPath, as it is not really clear while it should be at first glance. |
I can get cssSelector using jSoup but am not able to get xpath:idrelative, xpath:attributes, xpath:location. StringBuilder absPath=new StringBuilder();
Help would be appreciated :) |
From test you can see usage.