C# XMLElement.OuterXML in a single line rather than format C# XMLElement.OuterXML in a single line rather than format xml xml

C# XMLElement.OuterXML in a single line rather than format


XElement parse is the cleanest way. You can save a line or two with:

logger.Info(XElement.Parse(request.OuterXml).ToString());