8

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?

1 Answer 1

13

You can try XmlTextReader.ReadOuterXml().

Sign up to request clarification or add additional context in comments.

1 Comment

Just a note. This can not be used to debug input since it can not read with invalid XML :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.