J
JD
Hello-
I am a beginner to .NET XML, and I currently have a web service that returns
a full XML document. I want to use an XPath statement to return a portion
of the same XML file in a new function.
I am trying to perform a SELECTNODES using a XPath statement from the
original XML load, but I cannot seem to write this back out into a XML file.
I realize the error is in sing the XmlNodeList statement, but I am a bit
stumped.
Any ideas?
Here is my code:
Public Function _
GetService() As System.Xml.XmlDocument
Dim myXML As New XmlDocument()
Dim specs As String
specs = "/Root/Bind/Application[1]"
myXML.Load("App_Data/data.xml")
Dim myXmlNodeList As XmlNodeList = myXML.SelectNodes(specs)
myXML.Load(myXmlNodeList)
GetService = myXML
End Function
I am a beginner to .NET XML, and I currently have a web service that returns
a full XML document. I want to use an XPath statement to return a portion
of the same XML file in a new function.
I am trying to perform a SELECTNODES using a XPath statement from the
original XML load, but I cannot seem to write this back out into a XML file.
I realize the error is in sing the XmlNodeList statement, but I am a bit
stumped.
Any ideas?
Here is my code:
Public Function _
GetService() As System.Xml.XmlDocument
Dim myXML As New XmlDocument()
Dim specs As String
specs = "/Root/Bind/Application[1]"
myXML.Load("App_Data/data.xml")
Dim myXmlNodeList As XmlNodeList = myXML.SelectNodes(specs)
myXML.Load(myXmlNodeList)
GetService = myXML
End Function