---
Dim vDoc As XmlDocument = New XmlDocument
vDoc.Load(pathToXml)
Dim objTest As XmlElement
objTest = vDoc.SelectSingleNode("//profileData/friends")
If Not (objTest Is Nothing) Then
'The node is present, do nothing
Dim blank = ""
Else
'The node is absent, process code to create it.
Dim xml = XDocument.Load(pathToXml)
Dim vbfriends = From friends In xxml.
vvbfriends(0).Add(
xml.Save(pathToXml, SaveOptions.None)
End If
沒有留言:
張貼留言