-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Description
If I run the following code:
`
String html = "<!DOCTYPE html>" +
"<html>" +
" <head>" +
" <title>test</title>" +
" </head>" +
" <body>" +
" <div class=\"g\">" +
" </div>" +
" <div class=\"g x y t\">" +
" </div>" +
" </body>" +
"</html>";
Document document = Jsoup.parse(html);
String xpath = "//div[@class='g']";
XElements elements = Xsoup.compile(xpath).evaluate(document);
System.out.println(elements.getElements().size());
for (Element element : elements.getElements())
{
System.out.println(element.toString());
}
`
I get two elements as out put:
<div class="g">
and
<div class="g x y t">
In Chrome, I get only one, the one with the exact match. Who is wrong, xsoup or Chrome?
Metadata
Metadata
Assignees
Labels
No labels