Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: How to build hierarchical XML from DataSet >Thread Next - Re: How to build hierarchical XML from DataSet Re: How to build hierarchical XML from DataSetTo: NULL Date: 6/12/2008 4:57:00 AM On Jun 12, 1:22=A0pm, Martin Honnen <mahotr...@yahoo.de> wrote: > gamesfor...@hotmail.com wrote: > > I need to build the following XML structure in my businnesslayer in > > VB.NET. > > > <ProductionDataExtract> > > =A0 <Region region=3D"South"> > > =A0 =A0 <MonthToDate> > > =A0 =A0 =A0 <ProductionBudget>2338</ProductionBudget> > > =A0 =A0 </MonthToDate> > > =A0 </Region> > > </ProductionDataExtract> > > > My problem is that when i use DataSet.getXML() i will get a flat file > > structure on the xml returned. > > Then don't use a DataSet but use XmlWriter or XmlDocument to create the > XML as needed. Or if you need to use the DataSet one way to get the > required result is to write an XSLT stylesheet that transforms the XML > as needed. > > -- > > =A0 =A0 =A0 =A0 Martin Honnen --- MVP XML > =A0 =A0 =A0 =A0http://JavaScript.FAQTs.com/ Thanx! Hm, ok so i will need a step in between.... Right now I have a method that calls my DB and gets the records returned into a DataSet. Then I want to take that dataset and create the XML as I described. What I dont understand is how the XmlWriter can be able to read from the DataSet and then explicitly defined that <ProductionDataExtract> is going to be the root node and <Region> will be a child node underneath etc...That is possible to define with the XmlWriter? | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
