The heading pretty much explains what I would like to achieve, but here is an example to elaborate further:
Given the following table:
CREATE TABLE [CustSchema].[TestTable](
[Desc] [varchar](50) NOT NULL
) ON [PRIMARY]
When I load this table into a DataTable, and then spit it out again using DataSet.WriteXml(), I get the following output:
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<TestTable>
<Desc>XROW1</Desc>
</TestTable>
<TestTable>
<Desc>XROW2</Desc>
</TestTable>
</NewDataSet>
Whereas, I would like to preserve the table's schema - ie, get this:
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<CustSchema.TestTable>
<Desc>XROW1</Desc>
</CustSchema.TestTable>
<CustSchema.TestTable>
<Desc>XROW2</Desc>
</CustSchema.TestTable>
</NewDataSet>
Can anyone point me in the right direction? TIA.