OP.XmlPrettifier

Background

In my recent project I had automatically generated XML log files which were pretty condensed to preserve space. Parsing them with an application is not a problem but sometimes I needed to read them and this cause issues since it was nearly impossible to read it with Notepad++.
There are some online Xml beautifiers but our log files were 100+MB large so it was not practical to use them.
Also the log files were XML fragments and not complete documents so it caused problems with some desktop beautifier applications.
At the end I decided to create my own small console application.

How it works

OP.XmlPrettifier is a .NET 3.5 C# console application. It uses the Xml reader to read the fragmented/complete Xml and then loads fragment by fragment into XmlDocument and uses formatting XmlWriter to output the same XML indented.
When invoked with one parameter it reads the input file and outputs the result to the console. If two parameters are present then it reads the input file and outputs the result to the output file.
I’ve hosted the application on codeplex and you can find it here: https://xmlprettifier.codeplex.com/

Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *

*