[jdom-interest] again xpath with default namespace
florianwendland at freenet.de
florianwendland at freenet.de
Mon Apr 30 04:48:29 PDT 2007
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
More information about the jdom-interest
mailing list