I have a datatable and populate that datatable. after that i save that datatable content to xml file and found xml data with in xml file looks funny.
see how i work.
DataSet dsSettings = new DataSet();
DataTable dtSettings = new DataTable();
dtSettings.Columns.Add("Ticker", typeof(string));
dtSettings.Columns.Add("ClientCode", typeof(string));
dtSettings.Columns.Add("xml", typeof(string));
dr = dtSettings.NewRow();
dr["Ticker"] = strTicker;
dr["ClientCode"] = strclientcode;
dr["xml"] = xml;
dtSettings.Rows.Add(dr);
dsSettings.Tables.Add(dtSettings);
CSMSettingsFile = @"C:\aa\a.xml";
dsSettings.WriteXml(CSMSettingsFile);
now see how xml data looks like in xml file. instead of tag now this kind of characters are showing < how to get rid of this problem?
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<Table1>
<Ticker>FLNC</Ticker>
<ClientCode>FLNC</ClientCode>
<xml><?xml version="1.0" encoding="utf-16"?>
<root>
<Alltabs>
<ID>2679</ID>
<TabName>Disclosure</TabName>
<DisplayName>Disclosure</DisplayName>
<Selected>true</Selected>
<Order>1</Order>
</Alltabs>
<Alltabs>
<ID>2680</ID>
<TabName>Summary</TabName>
<DisplayName>Summary</DisplayName>
<Selected>true</Selected>
<Order>2</Order>
</Alltabs>
<Alltabs>
<ID>2681</ID>
<TabName>Model</TabName>
<DisplayName>Vertical</DisplayName>
<Selected>true</Selected>
<Order>3</Order>
</Alltabs>
<Alltabs>
<ID>2682</ID>
<TabName>Horizontal</TabName>
<DisplayName>Horizontal</DisplayName>
<Selected>false</Selected>
<Order>4</Order>
</Alltabs>
<Alltabs>
<ID>2696</ID>
<TabName>Delta</TabName>
<DisplayName>Delta</DisplayName>
<Selected>false</Selected>
<Order>5</Order>
</Alltabs>
<Alltabs>
<ID>2683</ID>
<TabName>Dashboard</TabName>
<DisplayName>Dashboard</DisplayName>
<Selected>false</Selected>
<Order>6</Order>
</Alltabs>
<Alltabs>
<ID>2684</ID>
<TabName>Internal</TabName>
<DisplayName>Internal</DisplayName>
<Selected>false</Selected>
<Order>7</Order>
</Alltabs>
<Alltabs>
<ID>2685</ID>
<TabName>Valuation</TabName>
<DisplayName>Valuation</DisplayName>
<Selected>false</Selected>
<Order>8</Order>
</Alltabs>
<Alltabs>
<ID>2686</ID>
<TabName>Notes</TabName>
<DisplayName>Notes</DisplayName>
<Selected>false</Selected>
<Order>9</Order>
</Alltabs>
<Alltabs>
<ID>2733</ID>
<TabName>FLNC_Summary_Segment_Revenues</TabName>
<DisplayName>Summary Segment Revenues</DisplayName>
<Selected>true</Selected>
<Order>10</Order>
</Alltabs>
<Alltabs>
<ID>2734</ID>
<TabName>FLNC_Summary_P&L</TabName>
<DisplayName>Summary P&L</DisplayName>
<Selected>true</Selected>
<Order>11</Order>
</Alltabs>
<Alltabs>
<ID>2735</ID>
<TabName>FLNC_P&L_Comparison</TabName>
<DisplayName>P&L Comparison</DisplayName>
<Selected>true</Selected>
<Order>12</Order>
</Alltabs>
<Alltabs>
<ID>2736</ID>
<TabName>FLNC_Metrics</TabName>
<DisplayName>Metrics</DisplayName>
<Selected>true</Selected>
<Order>13</Order>
</Alltabs>
</root></xml>
</Table1>
</NewDataSet>