How to: Generate XML file from database table
This article shows how we can show our table data in XML file and we can save that file anywhere in our system.
The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: How to: Generate XML file from database table


Vijay PatelPosted Mar 26, 2010, 9:23 PM EDT
Hi Rahul, Great Job Dude, your code is really very useful for me. I have some issues like, how can change Tags like <NewDataSet>, <Table> etc, How can I add Attribute in <Table> tag? Because I need more table data in single XML file. Thanks in Advance, Regards.
Rumba GirlPosted Aug 15, 2007, 8:25 AM EDT
Hello, I am having an exercise about transforming a table to XML file, the table contains the following: Name, First name, Address, Email, Phone N1 P1 A1 [email protected] 83343 N2 P2 A2 [email protected] 34343 We consider Email and Phone as attributes, Could you please tell me how to write it in XML? Thanks
Chand KPosted Jul 8, 2007, 11:59 PM EDT
Excellent work...Keep it up
Unlink linkPosted Jun 30, 2007, 6:44 PM EDT
Tks for the brilliant article. Very helpful! I have a question and I hope you can help out. I am trying to write this file to my webserver. But instead it tries to write to the D: folder (as stated in the article). How can I do it to write in the webserver. When running at my localhost it runs fine, but when running in my webhost it gives me an error saying that I do not have permissions since it is trying to access the C: file. Any suggestions. Really appreciate some help. Thank you.
Rodrigo PerezPosted Jun 20, 2007, 9:44 AM EDT
Nice piece of code for getting xml right from a db.
Amit spPosted Jun 19, 2007, 11:41 AM EDT
Hi, This is really a nice approach. But i will prefer using an alternative simpler approach... strXML = dataset.getxml