trevorjdaniel
Member
- Joined
- Sep 24, 2009
- Messages
- 8
- Programming Experience
- 1-3
Hello,
I am trying to work out how to read some xml that is being returned from an external URL.
Firstly, to get the XML response I have to send it some relevant information. I have done this with the following code:
When I check Fiddler, I can see that well formed XML is being returned and looking at the above code it seems to be stored as a byte in "response"
But I cannot work out how to now read this XML and returns the values within it.
Any help would be much appreciated
Thanks
Trev
I am trying to work out how to read some xml that is being returned from an external URL.
Firstly, to get the XML response I have to send it some relevant information. I have done this with the following code:
VB.NET:
Dim url = "http://XX.XX.XX.XX/test"
Dim client As New WebClient
client.Headers.Add("Content-Type", "application/xml")
Dim sentXml As Byte() = System.Text.Encoding.ASCII.GetBytes(xml.OuterXml)
Dim response As Byte() = client.UploadData(url, "POST", sentXml)
When I check Fiddler, I can see that well formed XML is being returned and looking at the above code it seems to be stored as a byte in "response"
But I cannot work out how to now read this XML and returns the values within it.
Any help would be much appreciated
Thanks
Trev