现在的位置: 首页 > 综合 > 正文

SelectNodes 表达式

2012年09月19日 ⁄ 综合 ⁄ 共 264字 ⁄ 字号 评论关闭
SelectNodes("//root/path");
SelectSingleNode("descendant::ContributingSubdomains");  

SelectNodes("//book[@genre='novel2'   and   @publicationdate='1992']"))  
SelectNodes("descendant::book[author/first-name='Margaret'and   author/last-name='Atwood']");  

前面加"@"就是属性了,不加就是节点

抱歉!评论已关闭.