Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting an XmlDataDocument to a string

Status
Not open for further replies.

gwaihir

Programmer
Sep 13, 2001
4
GB
Does anyone know of a simple way of converting an XmlDataDocument to a string. I have tried looking in the .NET framework documentation, but to no avail.

Thanks
 
I assume you want the xml written back out? Your in luck if so -- the XmlDataDocument contains an internal dataset. Use something similar to this:

XmlDataDocument xdd = new XmlDataDocument;

/* your code */

// get xml as string...
xdd.DataSet.GetXml()

You can also use .WriteXml() to write to a stream/file...etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top