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

text()[not(ancestor::div[@class='e'])] is not working #44

Closed
iLibra opened this issue Sep 13, 2019 · 0 comments
Closed

text()[not(ancestor::div[@class='e'])] is not working #44

iLibra opened this issue Sep 13, 2019 · 0 comments
Labels

Comments

@iLibra
Copy link

iLibra commented Sep 13, 2019

Please answer these questions before submitting your issue. Thanks!

  1. What did you do(使用的表达式与使用场景,确保能够复现)?
    If possible, provide a recipe for reproducing the error.
    String test="<div class='a'> a <div>need</div> <div class='e'> not need</div> c </div>";

JXDocument j = JXDocument.create(test);
List<JXNode> l = j.selN("//div[@class='a']//text()[not(ancestor::div[@class='e'])]");
for (JXNode i : l){
System.out.println(i);
}
`

  1. What did you expect to see(期望看到什么)?
    a need c

  2. What did you see instead(JsoupXpath给出的结果)?
    a need no need c

  3. What version of JsoupXpath are you using(当前版本)?
    2.3.2

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

No branches or pull requests

2 participants