提取出内容,自己想怎么处理都可以。
Dim document As New System.Xml.XmlDocument
document.LoadXml("<?xml version=""1.0"" encoding=""utf-8""?><iDLabelInfo> <ProductName>LUNAR FLYKNIT 3 iD</ProductName> <Sizes> <sz SizeCode=""12.5"" SizeType=""us"" /> <sz SizeCode=""11"" SizeType=""uk"" /> </Sizes> <MainColorway>Black Heather/Volt/white</MainColorway> <DesignedBy>Hiroyuki Sugiyama</DesignedBy> <ImageURL>ttp://origin-nikeid.nike.com//services/imgredirect/mtr-802081658/bgc-na/wid-574/vw-9</ImageURL> <WorkOrderNumber>W00001</WorkOrderNumber></iDLabelInfo>")
For Each n As Xml.XmlNode In document.DocumentElement.ChildNodes
If n.Name <> "#text" Then
Output.Show(n.Name & "=" & n.InnerText)
End If
For Each n1 As Xml.XmlNode In n.ChildNodes
If n1.Attributes IsNot Nothing Then
For Each xa As Xml.XmlAttribute In n1.Attributes
Output.Show(xa.Name & "=" & xa.Value)
Next
End If
Next
Next