B
Bryan Dickerson
Still considering myself a newbie to the world of XML, etc., 'cause my
program is still not working (not that I'll be an expert when it does,
but...). When I try to apply XPath statements to the XML string to pull
nodes, etc. out of it, I'm getting nothing back. Could my problem be that
the XML that is returned from my Web service does not have the standard "
<?xml version="1.0" ?>" (or whatever it is) header on it?
Here's my code:
------------------------------------------------------
Dim oC As New localhost.Service1
Dim oXML As New XmlDocument
Dim oNL As XmlNodeList
Dim oNd As XmlNode
Try
oXML.LoadXml(oC.GetAllContacts(txCICust.Text, txCIType.Text))
oNL = oXML.DocumentElement.SelectNodes("NewDataSet/Table/CI_NAME")
txResults.Text = "Found " & oNL.Count & " Contact records: "
For Each oNd In oNL
txResults.AppendText(vbCrLf & oNd.Value)
Next
txResults.AppendText(vbCrLf & "Done.")
Catch ex As Exception
MessageBox.Show("Error occurred: " & ex.Message)
End Try
program is still not working (not that I'll be an expert when it does,
but...). When I try to apply XPath statements to the XML string to pull
nodes, etc. out of it, I'm getting nothing back. Could my problem be that
the XML that is returned from my Web service does not have the standard "
<?xml version="1.0" ?>" (or whatever it is) header on it?
Here's my code:
------------------------------------------------------
Dim oC As New localhost.Service1
Dim oXML As New XmlDocument
Dim oNL As XmlNodeList
Dim oNd As XmlNode
Try
oXML.LoadXml(oC.GetAllContacts(txCICust.Text, txCIType.Text))
oNL = oXML.DocumentElement.SelectNodes("NewDataSet/Table/CI_NAME")
txResults.Text = "Found " & oNL.Count & " Contact records: "
For Each oNd In oNL
txResults.AppendText(vbCrLf & oNd.Value)
Next
txResults.AppendText(vbCrLf & "Done.")
Catch ex As Exception
MessageBox.Show("Error occurred: " & ex.Message)
End Try