I've extracted a List of DomNode objects from the HTMLPage object using getByXPath. However, when I try and query a returned DomNode object, again using getByXPath, the results are as if I queried the HTMLPage object.
final WebClient webClient = new WebClient();
HTMLPage page = (HtmlPage) webClient.getPage("http://test.page.com");
final List<HtmlTableCell> cells = (List<HtmlTableCell>) page.getByXPath("//td[@width='85%']");
// Number of cells: 16
logger.debug("Number of cells: " + cells.size());
HtmlTableCell cell = cells.get(0);
final List<HtmlTableCell> childCells = (List<HtmlTableCell>) cell.getByXPath("//td[@width='85%']");
// Number of cells: 16
logger.debug("Number of cells: " + childCells.size());
//td
in XPath means Select all td elements no matter where they are in the document. See http://www.w3schools.com/xpath/xpath_syntax.asp