dom4j-user  

Re: [dom4j-user] XPath & Namespace

Edwin Dankert
Thu, 16 Feb 2006 03:47:06 -0800

Try something like this:

HashMap map = new HashMap();
map.put( "html", "http://www.w3.org/1999/xhtml";);

XPath xpath = DocumentHelper.createXPath( "//html:[EMAIL PROTECTED]'aw1']");
xpath.setNamespaceURIs( map);

List nodes = xpath.selectNodes( root);

Regards,
Edwin
--
http://www.edankert.com/