how to get the xmlfile content from database and the content stored the particular folder. (that mean xmlfilecontent stored our appliaction).
plz give me best suggestion
your's Venkat
How to get the xmlfile content from database
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Ring ZhongRank #6,843 · 255 reputationPosted Nov 26, 2013, 9:51 PM EST
http://www.e-iceblue.com/Knowledgebase/Spire.DataExport/Spire.DataExport-Program-Guide/How-to-Export-Data-into-XML-in-C.html
Below is the sample code:
private void Form1_Load(object sender, EventArgs e)
{
oleDbConnection1.ConnectionString = txtConnectString.Text;
oleDbCommand1.CommandText = txtCommandText.Text;
using (OleDbDataAdapter da = new OleDbDataAdapter())
{
da.SelectCommand = oleDbCommand1;
da.SelectCommand.Connection = oleDbConnection1;
DataTable dt = new DataTable();
da.Fill(dt);
dataGridView1.DataSource = dt;
}
}
private void btnExportToXml_Click(object sender, EventArgs e)
{
Spire.DataExport.XML.XMLExport xmlExport = new Spire.DataExport.XML.XMLExport();
xmlExport.DataSource = Spire.DataExport.Common.ExportSource.DataTable;
xmlExport.DataTable = this.dataGridView1.DataSource as DataTable;
xmlExport.ActionAfterExport = Spire.DataExport.Common.ActionType.OpenView;
xmlExport.FileName = @"..\..\ToXml.xml";
xmlExport.SaveToFile();
}
DEMO: http://www.e-iceblue.com/downloads/demo/spire.dataexport/introduction/ToXml.zip
hope it helps.