XML string to dataset

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

But it gives an error expecting url.
Thought I had this working before so don't know what I've changed.
Any help thanks.
LVL 58
Who is Participating?
Rose BabuConnect With a Mentor Senior Team ManagerCommented:

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)

Open in new window

Hope this will help you a lot.
GaryAuthor Commented:
Yep just found it myself. Thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.