轻松

记述我学习java的里程

常用链接

统计

积分与排名

友情链接

最新评论

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')]";

posted on 2008-09-04 12:48 轻松 阅读(1723) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: