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
  1. Home
  2. General Programming
  3. C#
  4. reading data from dataset to xml

reading data from dataset to xml

Scheduled Pinned Locked Moved C#
xmlquestion
5 Posts 2 Posters 0 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.
  • J Offline
    J Offline
    JacquesDP
    wrote on last edited by
    #1

    Hi all, just want to find out what the best method would be. I have a dataset with a datatable and values, now I want to write that to a xml file. Is it better to use xmlDocument for that or xmlwriter? Thanks in advance

    He who laughs last is a bit on the slow side

    D 1 Reply Last reply
    0
    • J JacquesDP

      Hi all, just want to find out what the best method would be. I have a dataset with a datatable and values, now I want to write that to a xml file. Is it better to use xmlDocument for that or xmlwriter? Thanks in advance

      He who laughs last is a bit on the slow side

      D Offline
      D Offline
      darkcalin
      wrote on last edited by
      #2

      DataSet dset = new DataSet(); dset.WriteXml(path,null); //this is the better idea

      J 1 Reply Last reply
      0
      • D darkcalin

        DataSet dset = new DataSet(); dset.WriteXml(path,null); //this is the better idea

        J Offline
        J Offline
        JacquesDP
        wrote on last edited by
        #3

        I knew there had to be an easy way :laugh:

        He who laughs last is a bit on the slow side

        D 1 Reply Last reply
        0
        • J JacquesDP

          I knew there had to be an easy way :laugh:

          He who laughs last is a bit on the slow side

          D Offline
          D Offline
          darkcalin
          wrote on last edited by
          #4

          :laugh:

          J 1 Reply Last reply
          0
          • D darkcalin

            :laugh:

            J Offline
            J Offline
            JacquesDP
            wrote on last edited by
            #5

            What I have done is to set up constraints on the dataset, but how do I catch any exception that are thrown? Which event do I need to check?

            He who laughs last is a bit on the slow side

            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