Hi, The following piece of code works fine primaryUserId = inputDocument.selectSingleNode("Document/[EMAIL PROTECTED]'Primary']/LOGIN/USERID").getText();
for the following xml tree <pre> <Document> <LOGIN_LIST filter="Primary"> <LOGIN> <USERID>testuser</USERID> <PASSWORD>somepassword</PASSWORD> </LOGIN> </LOGIN_LIST> </Document> </pre> 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 <pre> <Document xmlns="http://www.nget.com/coreapps/RunDVPRequest"> <LOGIN_LIST filter="Primary"> <LOGIN> <USERID>testuser</USERID> <PASSWORD>somepassword</PASSWORD> </LOGIN> </LOGIN_LIST> </Document> </pre> 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 ********************************************************** ____________________________________________________________________________________ 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news ------------------------------------------------------------------------- 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 dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user