我有一些 XML
<?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok">
<auth>
<token>123456</token>
<perms>write</perms>
<user nsid="74461753@N03" username="user" fullname="name" />
</auth>
</rsp>
我正在尝试使用 XPath 将“token”的值转换为字符串。简单吧。但我能做到吗?
Dim doc As New XmlDocument
doc.Load(url) 'gets the XML above.
Dim xmlNav As XPathNavigator
Dim xmlNI As XPathNodeIterator
xmlNav = doc.CreateNavigator()
xmlNI = xmlNav.Select("token")
如何将“123456”输出到变量中?