Let's say I have a System.Xml.XmlDocument
whose InnerXml
is:
<comedians><act id="1" type="single" name="Harold Lloyd"/><act id="2" type="duo" name="Laurel and Hardy"><member>Stan Laurel</member><member>Oliver Hardy</member></act></comedians>
I'd like to format it thusly, with newlines and whitespace added:
<comedians>
<act id="1" type="single" name="Harold Lloyd"/>
<act id="2" type="duo" name="Laurel and Hardy">
<member>Stan Laurel</member>
<member>Oliver Hardy</member>
</act>
</comedians>
I looked in the XmlDocument
class for some prettifying method, but couldn't find one.