Alternatively, you can do it the 'correct' way and just map the
default namespace to a prefix and use the prefix in your XPaths.

Using something like this:

Document document = reader.read(new File("findings.html"));
XPath xp = DocumentFactory.getInstance().createXPath("//xhtml:[EMAIL 
PROTECTED]'content_left']");
Map ns = new HashMap();
ns.put( "xhtml","http://www.w3.org/1999/xhtml";);
xp.setNamespaceURIs( ns);
List nodes = xp.selectNodes(  document.getRootElement());

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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to