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. General Programming
  3. C#
  4. Using XML as a data source

Using XML as a data source

Scheduled Pinned Locked Moved C#
csharpdatabasesql-servervisual-studiosysadmin
4 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.
  • R Offline
    R Offline
    Rafone
    wrote on last edited by
    #1

    Been searching eveything I know to search and cant find anything specific enough. Is there a way to make an XML file into a data source so I can take advantage of the Data-Aware capibilities in Visual Studio 2008. I would like to use the Data Source and Data Navigator to develop a simple data entry form that had 6 data bound textboxs and a child DataGridView with the ability to add, delete and modify some small(300-500 items) xml files. In other words use the XML files like I would use SQL server. Thanks in advance for any comments or suggestions and links to any examples would be helpful. rafone

    Statistics are like bikini's... What they reveal is astonishing ... But what they hide is vital ...

    H R 2 Replies Last reply
    0
    • R Rafone

      Been searching eveything I know to search and cant find anything specific enough. Is there a way to make an XML file into a data source so I can take advantage of the Data-Aware capibilities in Visual Studio 2008. I would like to use the Data Source and Data Navigator to develop a simple data entry form that had 6 data bound textboxs and a child DataGridView with the ability to add, delete and modify some small(300-500 items) xml files. In other words use the XML files like I would use SQL server. Thanks in advance for any comments or suggestions and links to any examples would be helpful. rafone

      Statistics are like bikini's... What they reveal is astonishing ... But what they hide is vital ...

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      Well sort of. I do not know of a way to do this directly, although there may be one. However, the DataSet class has a ReadXml method as, I believe, does the DataTable class. Obviously they both also have WriteXml methods too. So you can create a DataSet, or DataTable, in memory and read the XML into it. From then on it is just like using SQL Server. If you Google/Bing for dataset.readxml you will find loads of examples.

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

      R 1 Reply Last reply
      0
      • H Henry Minute

        Well sort of. I do not know of a way to do this directly, although there may be one. However, the DataSet class has a ReadXml method as, I believe, does the DataTable class. Obviously they both also have WriteXml methods too. So you can create a DataSet, or DataTable, in memory and read the XML into it. From then on it is just like using SQL Server. If you Google/Bing for dataset.readxml you will find loads of examples.

        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

        R Offline
        R Offline
        Rafone
        wrote on last edited by
        #3

        Thanks Henry

        Statistics are like bikini's... What they reveal is astonishing ... But what they hide is vital ...

        1 Reply Last reply
        0
        • R Rafone

          Been searching eveything I know to search and cant find anything specific enough. Is there a way to make an XML file into a data source so I can take advantage of the Data-Aware capibilities in Visual Studio 2008. I would like to use the Data Source and Data Navigator to develop a simple data entry form that had 6 data bound textboxs and a child DataGridView with the ability to add, delete and modify some small(300-500 items) xml files. In other words use the XML files like I would use SQL server. Thanks in advance for any comments or suggestions and links to any examples would be helpful. rafone

          Statistics are like bikini's... What they reveal is astonishing ... But what they hide is vital ...

          R Offline
          R Offline
          Rafone
          wrote on last edited by
          #4

          Found this if anyone is intrested... Using XML as Database[^] rafone

          Statistics are like bikini's... What they reveal is astonishing ... But what they hide is vital ...

          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