How to control root node name for the DataTable.WriteXML method

Tech-Archive recommends: Speed Up your PC by fixing your registry



I am trying to leverage ADO.NET 2.0 DataTable WriteXML method and serialize
datatable as an XML file..

dataTable.WriteXml(xmlFile)

Unfortunately, root node of the output file is always DocumentElement. Is
there way to control the name of the root node for the XML output?


.



Relevant Pages

  • Re: How to control root node name for the DataTable.WriteXML method ca
    ... Robbe Morris - 2004/2005 Microsoft MVP C# ... > datatable as an XML file.. ... root node of the output file is always DocumentElement. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Password management
    ... But it would still be Swing in a non Swing app. ... standard input an XML file containing a bunch of parameters, ... I do some reading and grepping on the output file, ... I have to create the test database using a very privileged ...
    (comp.lang.java.programmer)
  • Re: XML Logging Write one record
    ... The reason we like to log to an xml file is that we like to analyse this ... But i don't want read the complete file into memory for writing one record. ... complete XMLDocument that you add nodes to (as children of the root node at ... Appending to an XML file sequentially is problematic ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Appending to an XML file.
    ... With the XML file, you will have to store the results in a file that is ... Well-formed XML has a root node. ... but I need to append to it instead. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Find an xml node
    ... If this is a proper XML file it will have a root node these nodes will be children of. ... In that case you can use XDocument ) and XLINQ: ... "Marco Trapanese" wrote in message ...
    (microsoft.public.dotnet.languages.vb)