我试图从节点内部提取一个值,但似乎无法让它工作。我想从name =" Container.DeviceId"
获取value =<coreProperties>
<coreProperty name="Common.ApplicationHome" value="1" />
<coreProperty name="Common.InstallationHome" value="2" />
<coreProperty name="Container.DeviceId" value="3"/>
<coreProperty name="Service.DeviceID" value="4/>
<coreProperty name="Service.DeviceType" value="5" />
<coreProperty name="Service.LocationID" value="6" />
</coreProperties>
这是我到目前为止所拥有的
doc.Load(file1)
Dim root As XmlNode = doc.DocumentElement
Dim nodeDeviceId As XmlNode = root.SelectSingleNode("/coreProperties/coreProperty[@name='Container.DeviceId']")
Dim deviceID As String = nodeDeviceId.Attributes.ItemOf("value").InnerText