?
Solved

XML string to dataset

Posted on 2012-08-29
2
Medium Priority
?
650 Views
Last Modified: 2012-08-29
I'm trying to read an XML string into a dataset.
This is not from a url from an in memory xml e.g.
todayxml = XElement.Load(strURL)
then trying
ds.ReadXml(todayxml)

But it gives an error expecting url.
Thought I had this working before so don't know what I've changed.
Any help thanks.
0
Comment
Question by:Gary
2 Comments
 
LVL 16

Accepted Solution

by:
Rose Babu earned 2000 total points
ID: 38346096
Hi,

try the below code to read XML string to dasaset

Dim stream As StringReader = Nothing
Dim reader As XmlTextReader = Nothing

Dim xmlDS As New DataSet()
stream = New StringReader(todayxml)

reader = New XmlTextReader(stream)
xmlDS.ReadXml(reader)

Open in new window

Hope this will help you a lot.
0
 
LVL 58

Author Closing Comment

by:Gary
ID: 38346116
Yep just found it myself. Thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question