0
Node existingUserNode = loginDoc.selectSingleNode("/returningUser");
String username = existingUserNode.selectSingleNode("/username").getText();
String password = existingUserNode.selectSingleNode("/password").getText();
XPATH解析爲DOM4J /文件
<?xml version="1.0" encoding="UTF-8"?><returningUser><username>user</username><password>password</password></returningUser>
返回null。
我不認爲我的xpath是錯的?或者我使用錯誤的方法?
是DOM4J的要求太高? – 2010-08-09 22:11:18