XPATH错误方法未知:contains(@” 的解决办法

XPATH错误方法未知:contains(@” 的解决办法
创建xmlDom后加上“xmlDom.setProperty('SelectionLanguage','XPath');
xPath查询如:等值查询:String xPath = "users/user[username='huo' and password='123']";模糊查询:String xPath = "users/user[contains(username,'huo') and contains(password,'123')]";
 ---------------------------------------------------------------------------------------------------------- 
XML第二种存储方式 .xml xPath查询如:加"@" 用以查询属性值等值查询:String xPath = "users/user[@username='huo' and @password='123']";模糊查询:String xPath = "users/user[contains(@username,'huo') and contains(@password,'123')]";

你可能感兴趣的:(XPATH错误方法未知:contains(@” 的解决办法)