Solved

Reding xml object in to a dataset

Posted on 2004-09-14
3
167 Views
Last Modified: 2007-09-28
I have an xml data coming back to me in the form of a object. I need this xml data to be read in to the dataset. How can I read an object data in to a dataset using vb.net. Its very urgent
0
Comment
Question by:angireddy
3 Comments
 
LVL 10

Accepted Solution

by:
Clif earned 500 total points
ID: 12056222
       Dim sXML As String
        Dim xTest As New Xml.XmlDocument

        sXML = "<dataroot>"
        sXML += "<record>"
        sXML += "<column1>"
        sXML += "Column 1a"
        sXML += "</column1>"
        sXML += "<column2>"
        sXML += "Column 2a"
        sXML += "</column2>"
        sXML += "<column3>"
        sXML += "Column 3a"
        sXML += "</column3>"
        sXML += "</record>"
        sXML += "<record>"
        sXML += "<column1>"
        sXML += "Column 1b"
        sXML += "</column1>"
        sXML += "<column2>"
        sXML += "Column 2b"
        sXML += "</column2>"
        sXML += "<column3>"
        sXML += "Column 3b"
        sXML += "</column3>"
        sXML += "</record>"
        sXML += "</dataroot>"

        xTest.LoadXml(sXML)

        Dim xmlTest As New XmlDocument
        xmlTest.LoadXml(sXML)
        Dim ds As New DataSet
        Dim reader As New XmlNodeReader(xmlTest)
        ds.ReadXml(reader)
        reader.Close()
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
update textboxes with Streamreader 21 44
Visual Studio 2013 Shortcut (VB) 4 45
ASP/VB email question 4 31
How do sunrise and sunset times change with altitude 14 26
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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

12 Experts available now in Live!

Get 1:1 Help Now