<?xml version="1.0" encoding="gb2312" ?>
<list>
<matches name="name1">
<match id="1" time="2004.3.7" info="a1#b1#c1#d1" />
<match id="2" time="2004.3.7" info="a2#b2#c2#d2" />
</matches>
<matches name="name2">
<match id="3" time="2004.3.7" info="a3#b3#c3#d3" />
</matches>
<matches name="name1">
<match id="4" time="2004.3.8" info="a4#b4#c4#d4" />
</matches>
</list>xml文件内容如上,如何用selectNodes或selectSingleNode方法一步定位到info="a4#b4#c4#d4"的那个节点,即:既满足matches的属性name="name1",同时又满足matches的子节点match的属性info含有a4和c4子串,我想用contains函数,但屡次出错。请教高手解答。谢谢!!
<list>
<matches name="name1">
<match id="1" time="2004.3.7" info="a1#b1#c1#d1" />
<match id="2" time="2004.3.7" info="a2#b2#c2#d2" />
</matches>
<matches name="name2">
<match id="3" time="2004.3.7" info="a3#b3#c3#d3" />
</matches>
<matches name="name1">
<match id="4" time="2004.3.8" info="a4#b4#c4#d4" />
</matches>
</list>xml文件内容如上,如何用selectNodes或selectSingleNode方法一步定位到info="a4#b4#c4#d4"的那个节点,即:既满足matches的属性name="name1",同时又满足matches的子节点match的属性info含有a4和c4子串,我想用contains函数,但屡次出错。请教高手解答。谢谢!!
#import "msxml.dll"
仍然出错(找不到函数),可能是引入的xml库版本太低了。
用这个XPath就可以了难道都不看XPath Syntax的……