Save tables in XML files

G

Guest

Hello,
I need to save my dataset in an XML file. I use a XSD file like 'books.xsd'
that you can find everywhere in SDK. So, I have two tables and I save them
Mydataset.WriteXml("fileName.xml")
I have a xml file with all data of my first table and after all data of my
second table :
<book genre="autobiography" publicationdate="1981" ISBN="1-861003-11-0">
<title>The Autobiography of Benjamin Franklin</title>
</book>
<book genre="novel" publicationdate="1967" ISBN="0-201-63361-2">
<title>The Confidence Man</title>
</book>
<author>
<first-name>Benjamin</first-name>
<last-name>Franklin</last-name>
</author>
....

How can save my data lik this :
<bookstore>
<book genre="autobiography" publicationdate="1981" ISBN="1-861003-11-0">
<title>The Autobiography of Benjamin Franklin</title>
<author>
<first-name>Benjamin</first-name>
<last-name>Franklin</last-name>
</author>
<price>8.99</price>
</book>
.....
Thanks for your help
(Please, excuse me for my english)
 

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

Similar Threads

XMLTextReader.Name always returns "" 4
What is context node? 2
XmlDocument.SelectNodes 1
Xpath On selected node?? 2
XML - read thru the values 3
VB and XML question 4
XML reader error 1
Edit XML document 4

Top