guitardave78
Programmer
Hey all again.
Is it possible to create a node/element in an xml doc that from an xPath.
What I am doing is checking to see if it exists.
If it doesnt I want to create it from the xPath query.
}...the bane of my life!
Is it possible to create a node/element in an xml doc that from an xPath.
What I am doing is checking to see if it exists.
If it doesnt I want to create it from the xPath query.
Code:
saveNode("//Appearance//Top", xd).InnerText = main.Top
Function saveNode(ByVal xPath As String, ByVal xd As Xml.XmlDocument, Optional ByVal defaultSetting As Object = "") As Xml.XmlNode
If Not xd.SelectSingleNode(xPath) Is Nothing Then
'send the node back
saveNode = xd.SelectSingleNode(xPath)
Else
'create the node
'send the node back
End If
End Function
}...the bane of my life!