From: Adolfo R. <pel...@ya...> - 2014-07-12 22:16:15
|
Hi, I have a problem running xPath on a page with (I think) multiple namespaces. It seems this is happening for HTML5 pages including Facebook tags prefix="og: http://ogp.me/ns#". However, it works fine for pages with simple default namespace. See snippets below: Example working: BrowserVersion browser = BrowserVersion.FIREFOX_17; WebClient webClient = new WebClient (browser); HtmlPage page = webClient.getPage("http://www.sciforma.com/"); System.out.println(page.getByXPath("/:html").size()); Example not working: BrowserVersion browser = BrowserVersion.FIREFOX_17; WebClient webClient = new WebClient (browser); HtmlPage page = webClient.getPage("http://www.expion.com/"); System.out.println(page.getByXPath("/:html").size()); I would appreciate any comment if this is expected to work or is a future enhancement for HtmlUnit to understand multiple namespaces. Thanks |