Cannibal_Corpse
asked on
Parsing xmlHTTP response from server in VB.NET
Hi all,
I am using a VB.NET client to communicate with an ASP.NET web service. I am able to send an XML request via xmlHTTP and get a response back which I can display using xmlHTTP.responseXML.xml.
Whats the best way to parse this response from the server. I am trying to use xmlTextReader but it requires an xml file or a stream or a URL. What I have is xmlHTTP.responseXML. How can I use xmlTextReader function to parse xml from the responseXML. Or what are the alternatives available.
Dim reader As XmlTextReader = New XmlTextReader(xmlHTTP.resp onseXML.xm l)
gave the following error
Overload resolution failed because no accessible 'New' can be called without a narrowing conversion:
'Public Sub New(url As String)': Argument matching parameter 'url' narrows from 'System.Object' to 'String'.
'Public Sub New(input As System.IO.TextReader)': Argument matching parameter 'input' narrows from 'System.Object' to 'System.IO.TextReader'.
'Public Sub New(input As System.IO.Stream)': Argument matching parameter 'input' narrows from 'System.Object' to 'System.IO.Stream'.
Regards,
Cannibal Corpse
I am using a VB.NET client to communicate with an ASP.NET web service. I am able to send an XML request via xmlHTTP and get a response back which I can display using xmlHTTP.responseXML.xml.
Whats the best way to parse this response from the server. I am trying to use xmlTextReader but it requires an xml file or a stream or a URL. What I have is xmlHTTP.responseXML. How can I use xmlTextReader function to parse xml from the responseXML. Or what are the alternatives available.
Dim reader As XmlTextReader = New XmlTextReader(xmlHTTP.resp
gave the following error
Overload resolution failed because no accessible 'New' can be called without a narrowing conversion:
'Public Sub New(url As String)': Argument matching parameter 'url' narrows from 'System.Object' to 'String'.
'Public Sub New(input As System.IO.TextReader)': Argument matching parameter 'input' narrows from 'System.Object' to 'System.IO.TextReader'.
'Public Sub New(input As System.IO.Stream)': Argument matching parameter 'input' narrows from 'System.Object' to 'System.IO.Stream'.
Regards,
Cannibal Corpse
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.