XML string to dataset

Posted on 2012-08-29
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

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

    Accepted Solution


    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.
    LVL 58

    Author Closing Comment

    Yep just found it myself. Thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now