Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Reding xml object in to a dataset

Posted on 2004-09-14
3
Medium Priority
?
174 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
Clif earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

722 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