Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dataset creation

Status
Not open for further replies.

SMURF75

Programmer
Aug 28, 2004
87
GB
Hi!

My problem is following.. I really suck at dataset and xml :D

Or another way to put it. I want my xmlcode to look like

<data>
<element1>yadayada</element1>
<element2>yadayadayada</element2>
<subdata>
<subelement1>ya</subelement1>
<subelement2>da</subelement2>
</subdata>
<subdata>
<subelement1>da</subelement1>
<subelement2>ya</subelement2>
</subdata>
</data>

So... how do i create my datset if i want that to be the output in my xmlfile. Hope i did myself understandable. And im not interrested in adding "yadayada", im mainly after the dataset->xsd and i will figure out the rest by myself.

- - - - - - - - - - - - - - - - - -
Im three apples high, Im blue, and i most certainly like that cold beer that should be every mans right after a hard days work!
 
The best way to experiment would be to create your xml file and then load it into a dataset to see how ADO.Net builds the dataset schema.
 
jubble is right.

Either create your XML, and load into your dataset using
dataset.readxml(yourxmlfilename)

or create a dataset and export it to XML, using
dataset.writexml(yourxmlfilename)



Sweep
...if it works dont mess with it
 
If i wanted to experiment with it i wouldnt have asked the question :D
The main prblem though is not my unwillingness to experiment, its more that i just started using datasets and my database knowledge.... well i slept alot during DB courses at school.
So the thing is really me gettin lost in all tables rows columns and what to add to what. I also know how the dataset should look. I just dont know how to make it that way.
So please.. a sample.. or a good tutorial about databases and datasets would do me good :D


- - - - - - - - - - - - - - - - - -
Im three apples high, Im blue, and i most certainly like that cold beer that should be every mans right after a hard days work!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top