Solved

Reding xml object in to a dataset

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) 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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

18 Experts available now in Live!

Get 1:1 Help Now