How to build hierarchical XML from DataSet Options

G

gamesforums

Hi!

I need to build the following XML structure in my businnesslayer in
VB.NET.


<ProductionDataExtract>
<Region region="South">
<MonthToDate>
<ProductionBudget>2338</ProductionBudget>
</MonthToDate>
</Region>
</ProductionDataExtract>


My problem is that when i use DataSet.getXML() i will get a flat file
structure on the xml returned.


What I want is the following:
<ProductionDataExtract> (Root node, parent)
<Region> (child node of ProductionDataExtract, but parent to
MonthToDate)
<MonthToDate> (child node of Region, but parent to ProductionBudget)
<ProductionBudget> (child node of MonthToDate)


I have tried using ADO.NET's DataRelation Object, but of course this
wont work as I have no Key's between the parent and child elements.


So any suggestion are really appreciated! :)


Regards,
Mcad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top