Search code examples
asp.netxmltextreader

How do I output XML as a string from an XmlTextReader into a Response.Write?


I have retrieved some XML from an API (at least I think so, the server response is 'OK') however I am putting the response stream into an XmlTextReader, how do I output this XML as a string?


Solution

  • You can try XmlTextReader.ReadOuterXml().