again xpath with default namespace

"[email protected]" <[email protected]>
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.