在.NET中如何得到XML中中的href地址呢?其实,XmlDocument里已经包含了其中的信息。下面就是提取的例子,当然用正则表达式更好。
Dim a As New System.Xml.XmlDocument
a.LoadXml("")
Dim b As System.Xml.XmlProcessingInstruction
Dim c As String
Dim arr As System.Array
b = a.ChildNodes(1)
c = b.Value.ToString
arr = c.Split(" ")
c = arr(1)
arr = c.Split("=")
c = arr(1)
Label1.Text = c.Replace("'", "")