That's why I would recommend to always use a specific namespace prefix mapping in your code.
Like: HashMap map = new HashMap(); map.put( "test", "http://www.kremsresearch.at/tai"); DocumentFactory.getInstance().setXPathNamespaceURIs( map); Allows you to perform the next XPath search: document.selectSingleNode("//test:[EMAIL PROTECTED]" + id + "]"); This will still return the root element as before, even if you have a different prefix defined for this namespace. Regards, Edwin ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user