Dim xmlDoc As New Xml.XmlDocument
xmlDoc.Load("xx.xml")
Dim strNode As Xml.XmlNode= xmlDoc.SelectSingleNode("AutoUpdater")
Dim value As String = strNode.InnerText
'value = 123456789
Private Function GetXML(ByVal name As String) As String
Dim path As String
Dim hex As String = ""
path = Application.StartupPath
Try
Dim reader As New Xml.XmlTextReader(path)
reader.ReadToFollowing(name)
hex = reader.ReadString
reader.Close()
Catch ex As Exception
hex = -1
End Try
Return hex
End Function
读的时候 ,将XML放在EXE目录,调用GetXML(serverurl)