Skip to content

Instantly share code, notes, and snippets.

@OJ
Created April 20, 2009 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OJ/98396 to your computer and use it in GitHub Desktop.
Save OJ/98396 to your computer and use it in GitHub Desktop.
Another pile of shit that I stumbled across!
XmlDocument doc = rs.BuildXmlDoc();
System.IO.MemoryStream aMemoryStream = new System.IO.MemoryStream();
XmlTextWriter aXmlTextWriter = new XmlTextWriter(aMemoryStream, System.Text.Encoding.UTF8);
//save the xml representation in a memory stream
doc.Save(aXmlTextWriter);
//pass the xml as a parameter
param[2] = System.Text.Encoding.UTF8.GetString(aMemoryStream.ToArray());
// Added by me:
// whatever happened to...
param[2] = doc.OuterXml;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment