HELP!! WriteXml and DataSets
-
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|
-
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|
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
-
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
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
-
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
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.