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. XML / XSL
  4. HELP!! WriteXml and DataSets

HELP!! WriteXml and DataSets

Scheduled Pinned Locked Moved XML / XSL
questionxmlhelptutorial
4 Posts 4 Posters 3 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.
  • K Offline
    K Offline
    Karen
    wrote on last edited by
    #1

    Hi, I have converted a delimited text file to a DataTable and added to a new DataSet. I will add more than 1 table to this DataSet. Then my next task is to convert these tables into serveral xml files. For example, for the Category Table, I will have to make an xml file which contain datas where category num < 1000, and another xml file which contain datas where category num > 1000. However, since the WriteXml only belongs to the DataSet Object, but not the DataTable object, how do I do this?????:confused: ?????? Please help meeeee!!!! X|

    C 1 Reply Last reply
    0
    • K Karen

      Hi, I have converted a delimited text file to a DataTable and added to a new DataSet. I will add more than 1 table to this DataSet. Then my next task is to convert these tables into serveral xml files. For example, for the Category Table, I will have to make an xml file which contain datas where category num < 1000, and another xml file which contain datas where category num > 1000. However, since the WriteXml only belongs to the DataSet Object, but not the DataTable object, how do I do this?????:confused: ?????? Please help meeeee!!!! X|

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I'm not sure - are you asking how to write an XSL sheet to return the XML you want from the master document ? If not, this question would be better asked in the C# forum, because it relates to the .NET framework, more than XML itself. Not wanting to be picky, it's just that, well, if you look at how many posts this forum has had, and how many the C# forum has had, you do the math. You'll get more airplay there if you're asking what I think. If you want to create an XSL, that's another matter, just say so and provide some sample XML and I'd be happy to help. I don't know the answer if the question relates to using ADO.NET components to extract a subset of the data as XML. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

      L 1 Reply Last reply
      0
      • C Christian Graus

        I'm not sure - are you asking how to write an XSL sheet to return the XML you want from the master document ? If not, this question would be better asked in the C# forum, because it relates to the .NET framework, more than XML itself. Not wanting to be picky, it's just that, well, if you look at how many posts this forum has had, and how many the C# forum has had, you do the math. You'll get more airplay there if you're asking what I think. If you want to create an XSL, that's another matter, just say so and provide some sample XML and I'd be happy to help. I don't know the answer if the question relates to using ADO.NET components to extract a subset of the data as XML. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Oh, thank you Christian! I guess you are right! I should have posted this message to the ADO.NET one! How about a question like this: How to get a subset from an xml? Example: The spreadsheet table is like this : Category | SubCategory | AttributeName ---------------------------------------- Ottawa Tables Dimensions Ottawa Chairs Weight Alberta Tables Dimensions Kingston Tables Dimensions Alberta Chairs Weight Right now I have an xml file which contains all the above datas.(It's a bit long, so I didn't type it out).. What I want to do is to make a new xml file named: Ottawa.xml where it only contains the following: <Datas> <Entry> <SubCategory>Tables</SubCategory> <AttributeName>Dimensions</AttributeName> </Entry> <Entry> <SubCategory>Chairs</SubCategory> <AttributeName>Weight</AttributeName> </Entry> </Datas> Is there any possible way??? Please??? :(( Karen

        R 1 Reply Last reply
        0
        • L Lost User

          Oh, thank you Christian! I guess you are right! I should have posted this message to the ADO.NET one! How about a question like this: How to get a subset from an xml? Example: The spreadsheet table is like this : Category | SubCategory | AttributeName ---------------------------------------- Ottawa Tables Dimensions Ottawa Chairs Weight Alberta Tables Dimensions Kingston Tables Dimensions Alberta Chairs Weight Right now I have an xml file which contains all the above datas.(It's a bit long, so I didn't type it out).. What I want to do is to make a new xml file named: Ottawa.xml where it only contains the following: <Datas> <Entry> <SubCategory>Tables</SubCategory> <AttributeName>Dimensions</AttributeName> </Entry> <Entry> <SubCategory>Chairs</SubCategory> <AttributeName>Weight</AttributeName> </Entry> </Datas> Is there any possible way??? Please??? :(( Karen

          R Offline
          R Offline
          Ranjan Banerji
          wrote on last edited by
          #4

          Write an XSLT. One of the best ways to extract and transform XML is to write an XSLT. You can then apply the xslt to the XML and get the resulting XML. If you need help with the xslt, you will need to post a sample of your XML. Its really simple though.

          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