> List = document.selectNodes("//provincia");
>
> I obtain an empty list.
You document uses namespaces, and your xpath does not.
> If I remove all the namespaces specification it works fine, specially using
> "//provincia" it select all the "provincia" element found in the document,
> as I can expect.
>
> Anyone can tell me if it is a bug, or how can I correct this?
Not certain about the dom4j API, but jaxen itself has a Namespace
context that allows you to map a prefix->URI for the XPath
itself:
List nodes = document.selectoNodes( "//tns:provincia" );
So, you need to:
1) Use a prefix in your xpaths (no concept of 'default' namespace in xpath)
2) map the prefix to a URI via a NamespaceContext or some mechanism provided by dom4j.
-bob
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user