Hi,
I have a query in my database which delivers me a list of records with
5 fields:
title, description, link, pubDate and author
I know how to create the dataset. So that part is done.
My problem is how to create the XML file.
The XML schema is the one used in RSS 2.0.
For example, I need to create the following XML file:
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title></title>
<description></description>
<image>
<url></url>
<title></title>
<link></link>
<width></width>
</image>
<item>
<title></title>
<description></description>
<link></link>
<pubDate></pubDate>
<author></author>
</item>
</channel>
</rss>
Nodes like "title" should be created just using a string:
Node_Title.Value = MyTitle
Child Nodes like "image url" should also be created just using a
string:
ChildNode_ImageUrl.Value = MyImageUrl
The Items child nodes should be filled with the dataset information.
Could you tell me how to do this?
Thanks,
Miguel
Steven Nagy wrote:
Sorry, do you mean you need to create an XML file for the schema of the
database, or for the content? Or do you mean that you have an XML file
that you want to store in a database?
The Dataset class allows you to save your schema, data, or both as XML.
You can fill a dataset with data from your access database using a
System.Data.OleDb.OleDbDataAdapter.
Steven