Node existingUserNode = loginDoc.selectSingleNode("/returningUser");
String username = existingUserNode.selectSingleNode("/username").getText();
String password = existingUserNode.selectSingleNode("/password").getText();
为了
<?xml version="1.0" encoding="UTF-8"?><returningUser><username>user</username><password>password</password></returningUser>
返回空值。
我不认为我的 xpath 是错误的?还是我使用了错误的方法?