@Test public void testCharactersInIdAndClass() { String h = "<div><p id='a1-foo_bar'>One</p><p class='b2-qux_bif'>Two</p></div>"; Document doc = Jsoup.parse(h); Element el1 = doc.getElementById("a1-foo_bar"); assertEquals("One", el1.text()); Element el2 = doc.getElementsByClass("b2-qux_bif").first(); assertEquals("Two", el2.text()); Element el3 = doc.select("#a1-foo_bar").first(); assertEquals("One", el3.text()); Element el4 = doc.select(".b2-qux_bif").first(); assertEquals("Two", el4.text()); }
public static Elements select(String query, Element root) { return new Selector(query, root).select(); }
Selector { public static Elements select(String query, Element root) { return new Selector(query, root).select(); } }
Selector { public static Elements select(String query, Element root) { return new Selector(query, root).select(); } private  Selector(String query, Element root); private  Selector(Evaluator evaluator, Element root); }
Selector { public static Elements select(String query, Element root) { return new Selector(query, root).select(); } private  Selector(String query, Element root); private  Selector(Evaluator evaluator, Element root); static Elements select(String query, Element root); static Elements select(Evaluator evaluator, Element root); static Elements select(String query, Iterable<Element> roots); }
Selector { public static Elements select(String query, Element root) { return new Selector(query, root).select(); } private  Selector(String query, Element root); private  Selector(Evaluator evaluator, Element root); static Elements select(String query, Element root); static Elements select(Evaluator evaluator, Element root); static Elements select(String query, Iterable<Element> roots);  }