Click here to Skip to main content
15,914,444 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to convert all the data in the database table into an XML file.
That is, I need to export the data in the table into an XML file.

Im using Oracle as my database...

Somebody give me the code for doing it. Or give me any ideas on it...

Thanks and Regards,
Kalai
Posted
Updated 29-Apr-12 23:21pm
v4
Comments
Sandeep Mewara 30-Apr-12 1:52am    
What kind of help you are looking for? Be specific so that someone can help.
kalai91 30-Apr-12 5:19am    
I need the code for doing it. I have no idea of how to do it.!!

1 solution

C#
string Filename = "FileName";
System.IO.FileInfo fInfo = new FileInfo(path + "\\" + Filename + ".xml");
   if (dirInfo.Exists)
            {
                if (fInfo1.Exists)
                    fInfo1.Delete();
            }
            else
            {
                dirInfo = new DirectoryInfo(path);
                dirInfo.Create();
            }


 dataSet.WriteXml(path + "\\NewXml.xml", XmlWriteMode.WriteSchema);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900