Last post Jan 26, 2011 05:35 PM by BlogDog
Jan 25, 2011 05:43 PM|BlogDog|LINK
I'm connecting to a web service that returns a big 'ol XML data string. I'd like to convert it to a datatable so I can work with it. I've been reading on the
MSDN library and googlin on how to do this but I'm getting an exception: "Invalid URI: The Uri string is too long." and I don't understand what I'm doing wrong.
Here's what I've got:
'Set up Web Service
Dim myService As New PreSetWebService.Service1
'Query Webservice for info
Dim webServiceInfo As String = myService.WebServiceMethod(userName, password, Acct)
' Create a new DataSet.
Dim newDataSet As New DataSet("New DataSet")
' Read the XML string into the DataSet.
If this makes a difference, the xml string returned doesn't have columns or rows setup , just tags to define data attributes.
Jan 26, 2011 07:14 AM|Martin_Honnen|LINK
The ReadXml methods has several overloads, the one taking a string expects a URI from which an XML document can be loaded. You seem to have a string with the XML document itself, in that case use
Jan 26, 2011 05:35 PM|BlogDog|LINK
That did it!! Thank you very much Martin!!