Node existingUserNode = loginDoc.selectSingleNode("/returningUser");
String username = existingUserNode.selectSingleNode("/username").getText();
String password = existingUserNode.selectSingleNode("/password").getText();
for
<?xml version="1.0" encoding="UTF-8"?><returningUser><username>user</username><password>password</password></returningUser>
returns null.
I don't think my xpath is wrong? Or am I using the wrong method?