473,404 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Create a XML file from Database

Hello,

I need to add a XML file from an Access database.
Could someone tell me what would be the best approach?

Thanks,
Miguel

Oct 17 '06 #1
3 1910
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

Oct 17 '06 #2
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
Oct 18 '06 #3
Check if this helps: http://www.developer.com/net/asp/article.php/3636241

"shapper" <md*****@gmail.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
Hello,

I need to add a XML file from an Access database.
Could someone tell me what would be the best approach?

Thanks,
Miguel

Oct 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Albretch | last post by:
.. I am trying to create a database in a MS Access DB via JDBC drivers. I have tried both sun.jdbc.odbc.JdbcOdbcDriver and ids.sql.IDSDriver From some reason both drivers Exceptions tell me...
9
by: Peter | last post by:
Hello£¬everyone, My program will collect a testing machine's data ,save the data and deal with the data everyday. I want to use vb.net to create database, add and delete tables or modify the...
10
by: Minh | last post by:
I search in all the Disscussion but can not found. How can I create a MS Access Database file using C# code with a given Table Structure ? For example, I want to create a Access Database File...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: ndedhia1 | last post by:
I am having trouble loading a property file and keep getting this error when running my shell script that loads and runs my jar files, etc: no property file loaded, using defaults......
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.