请大神们帮个忙...用vb.net怎么读取以下的XML里面的<Value>539</Value> ?? 由于文字太多.我就直接上图了.
2个回答
展开全部
Dim xpathDoc As XPathDocument
Dim xmlNav As XPathNavigator
Dim xmlNI As XPathNodeIterator
xpathDoc = New XPathDocument("c:\builder.xml")
xmlNav = xpathDoc.CreateNavigator()
xmlNI = xmlNav.Select("//Value[not(@*)]") '选取所有不包含attribute的value节点(忽略层次关系)
While (xmlNI.MoveNext())
System.Console.WriteLine(xmlNI.Current.Name + " : " + xmlNI.Current.Value)
End While
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询