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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use DataSet.WriteXML to output an XML string without tabs and \n ?

Status
Not open for further replies.

huckfinn19

Programmer
May 16, 2003
90
CA
Hi!

I need to output an XML string directly from a DataSet without any "\t" or "\n" in it. Is there a simple way, or do I have to use another XML class to do this?

Thanks!

Huck
 
The GetXml() method returns the XML representation of the data stored in the DataSet.
Code:
string sxml=ds.GetXml();
sxml = sxml.Replace(Environment.NewLine,"")
           .Replace("\r","")
	   .Replace("\t","");
obislavu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top