[thelist] ASP.NET parsing xml response with XMLDocument class

Casey Crookston caseyc at IntelliSoftmn.com
Mon Oct 2 11:47:28 CDT 2006

Okay - on this little xml project I'm doing, I have now successfully
send the original HTTP Post to the remote server and received an XML
response.  What I now need to do is parse the response with the .net
XMLDocument class.  This is how I'm receiving the response:


Dim stIn As New StreamReader(req.GetResponse().GetResponseStream())


Now I need to add the contents of the stream reader to an XMLtext
variable.  If I do it directly:


Dim xmlResponse As XmlText = stIn then it throws this error:


Value of type 'String' cannot be converted to 'System.Xml.XmlText'.


Understandable. So, I'm just wondering how I convert a string to xml so
I can then parse it out with XMLDocument.





More information about the thelist mailing list