Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to get the xml from dataset

how to get the xml from dataset

Scheduled Pinned Locked Moved ASP.NET
xmlhelptutorial
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sooreeagt
    wrote on last edited by
    #1

    Hi all... Here i read xml from a string and i kept in a data set Dim myDS As DataSet = New DataSet Dim myTable As DataTable = New DataTable("DOList") myTable.Columns.Add("OtherData", Type.GetType("System.String")) myDS.Tables.Add(myTable) Dim xmldata As String = strXMLString Dim xmlsr As StringReader = New StringReader(xmldata) myDS.ReadXml(xmlsr, XmlReadMode.IgnoreSchema) next i have to read that xmldocument and i need to get some node .but i am not getting hoe to retrieve that xml document in data set can u please help me.

    Suresh.R

    S N 2 Replies Last reply
    0
    • S sooreeagt

      Hi all... Here i read xml from a string and i kept in a data set Dim myDS As DataSet = New DataSet Dim myTable As DataTable = New DataTable("DOList") myTable.Columns.Add("OtherData", Type.GetType("System.String")) myDS.Tables.Add(myTable) Dim xmldata As String = strXMLString Dim xmlsr As StringReader = New StringReader(xmldata) myDS.ReadXml(xmlsr, XmlReadMode.IgnoreSchema) next i have to read that xmldocument and i need to get some node .but i am not getting hoe to retrieve that xml document in data set can u please help me.

      Suresh.R

      S Offline
      S Offline
      Sylvester george
      wrote on last edited by
      #2

      your question is not clear.... you asked in the subject line

      sooreeagt wrote:

      how to get the xml from dataset

      but inside you explained sth else pls explain it properly

      Regards, Sylvester G sylvester_g_m@yahoo.com

      1 Reply Last reply
      0
      • S sooreeagt

        Hi all... Here i read xml from a string and i kept in a data set Dim myDS As DataSet = New DataSet Dim myTable As DataTable = New DataTable("DOList") myTable.Columns.Add("OtherData", Type.GetType("System.String")) myDS.Tables.Add(myTable) Dim xmldata As String = strXMLString Dim xmlsr As StringReader = New StringReader(xmldata) myDS.ReadXml(xmlsr, XmlReadMode.IgnoreSchema) next i have to read that xmldocument and i need to get some node .but i am not getting hoe to retrieve that xml document in data set can u please help me.

        Suresh.R

        N Offline
        N Offline
        Nouman Bhatti
        wrote on last edited by
        #3

        a code to read xml document and display it's properties in richtextbox ------------------------------------------------------------------------ XmlTextReader srd = new XmlTextReader("e:\\newschemafile.txt"); richTextBox1.Text = "XmlTextReader Properties Test\n"; while (srd.Read()) { if (srd.NodeType == XmlNodeType.Element) { richTextBox1.Text += "===================\n"; // Read this element's properties and display them on console richTextBox1.Text += "Name:" + srd.Name + "\n"; //richTextBox1.Text += "Base URI:" + srd.BaseURI + "\n"; //richTextBox1.Text += "Local Name:" + srd.LocalName + "\n"; //richTextBox1.Text += "Attribute Count:" + srd.AttributeCount.ToString() + "\n"; //richTextBox1.Text += "Depth:" + srd.Depth.ToString() + "\n"; //richTextBox1.Text += "Line Number:" + srd.LineNumber.ToString() + "\n"; //richTextBox1.Text += "Node Type:" + srd.NodeType.ToString() + "\n"; //richTextBox1.Text += "Attribute Count:" + srd.Value.ToString() + "\n"; //if(srd.NodeType == XmlNodeType.Text) richTextBox1.Text += "Value" + "\n"; if (srd.Name == "Parameter") { richTextBox1.Text += "name: " + srd.GetAttribute("name") + "\n"; richTextBox1.Text += "table: " + srd.GetAttribute("table") + "\n"; } else if (srd.Name == "Column") { richTextBox1.Text += "Column Name: " + srd.GetAttribute("name") + "\n"; richTextBox1.Text += "Column Type: " + srd.GetAttribute("type") + "\n"; } } -----------------------------------------------------------------

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups