Link to home
Start Free TrialLog in
Avatar of Cannibal_Corpse
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.responseXML.xml)

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
Avatar of armoghan
armoghan
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial