again xpath with default namespace
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Message-ID | <[email protected]> |
hi all,
i have a problem by creating an xpath expression with an default
namespace. The xpath expression didn't select the nodes, although i have
added the namespace to the xpath by calling
xp.addNamespace("http://www.test.de");
My document looks like:
<test xmlns="http://www.test.de">
<node>
</node>
</test>
The source:
XPath xp = XPath.newInstance("/test/node");
xp.addNamespace(ExiilConstants.NS);
xp.selectNodes(document);
Result of the list is allways 0.
Thy very much.
mfw
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]