473,662 Members | 2,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1936
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.Ole Db.OleDbDataAda pter.

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.Valu e = MyTitle

Child Nodes like "image url" should also be created just using a
string:
ChildNode_Image Url.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.Ole Db.OleDbDataAda pter.

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.goo glegroups.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
3547
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 'Syntax error in CREATE TABLE statement' even though I am not creating a table, but a Database // - - - - - - - - - - - - sun.jdbc.odbc.JdbcOdbc aSQL=CREATE DATABASE dbtest; java.sql.SQLException:
9
8297
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 records in the database. Is it possible to create a SQL Server database using vb.net? I know I can use vb.net and ADOX to create a Access database. But I can't create SQL database using vb.net.
10
7421
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 with 2 tables: Student and Department, of course, using C# code, not using MS Access to create manually. In Department table, I will have 3 Columns: DepartmentID (primary key, auto
15
5263
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 show - text boxes, input boxes, buttons, hyperlinks ie the usual. The data is not obtained directly from a database.
0
2085
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... (java.io.FileNotFoundException: /home/dedhia/.jftp/jftp.properties (No such file or directory)) Here is my java code in which I get the property file: String propertyFile =...
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8547
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7368
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1754
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.