无法选择带有标签名称的节点。
小XML:
<author-group id="a001">
<author id="aa001">
<given-name id="g001">Name</given-name>
<surname id="s001">Name</surname>
</author>
<author id="aa002">
<given-name id="g002">Name</given-name>
<surname id="s002">Name</surname>
</author>
<author id="aa003">
<given-name id="g003">Name</given-name>
<surname id="s003">Name</surname>
</author>
</author-group>
代码尝试:
Dim xDom As New Xml.XmlDocument
xDom .LoadXml(XMLStr)
Dim Lst As XmlNodeList = xDom.SelectNodes("//author")
Dim NodeCount as Integer =Lst.Count()
计数为零..