I have an XML input document that is horribly formatted (this is a Delphi project file if someone cares) - inconsistent indentation, empty lines, node lines grouped together:
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="HostApplication">C:\Some\Path\Filename.exe</Parameters> <Excluded_Packages> </Excluded_Packages>
I want to reformat it into something nice. What is an easy way to do this programmatically, with Win32 / COM? If MSXML, how do I do this?
I would also like to specify the indentation block (tab / multiple spaces).
I tried using the Delphi MSXML wrapper TXmlDocument, and it really removes empty lines and tabbed indents, but does not split lines like this:
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="HostApplication">C:\Some\Path\Filename.exe</Parameters> <Excluded_Packages>
source share