dom4j-user  

Re: [dom4j-user] problem with concept of xpath with namespaces in dom4j/jaxen

Edwin Dankert
Thu, 15 Dec 2005 06:49:04 -0800

The prefix you use for the namespace-URI does not matter when
you define your mapping. So you could have mapped

'urn:loc.gov:books' -> 'books'

and

'urn:w3-org-ns:HTML'  ->  'p',

Your XPath expression to get the p element would now look like
this:

/books:book/books:notes/p:p

For some more information, please have a look at:
http://www.edankert.com/defaultnamespaces.html

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