Solved

Reding xml object in to a dataset

Posted on 2004-09-14
3
166 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DataGridview Currency Formating? 22 52
I need help assigning an image to an image control in my VB.Net WPF project 3 43
DataGridView Events ? 3 37
Help with Syntax 9 23
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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

947 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

17 Experts available now in Live!

Get 1:1 Help Now