create an XmlDataDocument from the DataSet
http://msdn.microsoft.com/library/en...ctorTopic2.asp
then select the FirstChild. Example:
System.Xml.XmlDataDocument doc = new System.Xml.XmlDataDocument(ds);
System.Console.WriteLine(doc.FirstChild.OuterXml);
System.Xml.XmlNode n1= doc.FirstChild;
System.Console.WriteLine("\n\n" + n1.FirstChild.OuterXml); // this
strips the <DataSet> root off
"LoF" <dr***@pelab.com> wrote in message
news:0a****************************@phx.gbl...
Hi,
I am generating deeply nested XML document from a Dataset
using
' Write to the file with the WriteXml method.
DataSet21.WriteXml(myXmlWriter)
The generated XML contains the <DataSet2> node as a root
node (see below) is there a way to get rid of it? I ned
the <Header> node to be a Root node. All info is generated
from database.
Thanks
LoF
<DataSet2>
<Header>
<WONo>2308100</WONo>
<EDDID>SEDD</EDDID>
...