@Test public void and() { String h = "<div id=1 class='foo bar' title=bar name=qux><p class=foo title=bar>Hello</p></div"; Document doc = Jsoup.parse(h); Elements div = doc.select("div.foo"); assertEquals(1, div.size()); assertEquals("div", div.first().tagName()); Elements p = doc.select("div .foo"); assertEquals(1, p.size()); assertEquals("p", p.first().tagName()); Elements div2 = doc.select("div#1.foo.bar[title=bar][name=qux]"); assertEquals(1, div2.size()); assertEquals("div", div2.first().tagName()); Elements p2 = doc.select("div *.foo"); assertEquals(1, p2.size()); assertEquals("p", p2.first().tagName()); }
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);  }