Hi,
The following piece of code works fine
primaryUserId =
inputDocument.selectSingleNode("Document/[EMAIL
PROTECTED]'Primary']/LOGIN/USERID").getText();
for the following xml tree
<Document>
<LOGIN_LIST filter="Primary">
<LOGIN>
<USERID>testuser</USERID>
<PASSWORD>somepassword</PASSWORD>
</LOGIN>
</LOGIN_LIST>
</Document>
But when the above xml tree is modified by adding an
xmlns attribute to the root "Document" element, the
code no longer works and it throws a
NullPointerException
<Document
xmlns="http://www.nget.com/coreapps/RunDVPRequest">
<LOGIN_LIST filter="Primary">
<LOGIN>
<USERID>testuser</USERID>
<PASSWORD>somepassword</PASSWORD>
</LOGIN>
</LOGIN_LIST>
</Document>
Why is it no longer working? The XPath expression
should still work?
**********************************************************
* Saladin Sharif
* e-mail: [EMAIL PROTECTED]
* Visit homepage @ http://gaia.ecs.csus.edu/~sharifs
**********************************************************
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
dom4j-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dom4j-user