Some help with this please:
org.cyberneko.html.parsers.DOMParser dp = new DOMParser();
dp.parse(new InputSource(new StringReader("<!DOCTYPE html><html><body><div></div></body></html>")));
Document d = dp.getDocument();
XPathFactory xpf = XPathFactory.newInstance();
XPath x = xpf.newXPath();
Node n = (Node)x.evaluate("//div",d,XPathConstants.NODE);
System.out.println(n == null);
Any reason why n is null, thanks