Have you ever got into a situation to deal with large XML file? Do you know a tool which can format Java string representation of XML? What is your favorite XML editor tool, I have been using PSPad for a long time. But when i have to work with large XML file of size more than 100 MB it got hung to open (Though it was alerting me about large XML file), it was not easy for me to navigate around such large XML file using PSPad.

Right, I was having following problem to solve,

  1. I have two large XML file which is of size greater than 125 MB
  2. I have to format as it was a spit by some legacy Java application
  3. I have to compare two large XML file to understand the difference (Actually both returned by same Java API but at two different days !)

Since my PSPad is not friendly with me , I went to google looking for alternate tools. I immediately found Liquid Studio and downloaded their Community Version (It has license !! ).  The Liquid Studio was able to open my large XML file with out any problem. However I don’t see any option available to format the XML file. I re-searched in google and I landed in

  1. Few online tools which is not taking more than 2-5 MB
  2. Bunch of tools uploading my XML but no results at the end.
  3. The tool like XML Explorer promising but I could even download as my browser blocked it.

I finally landed in a tool which is part of my Cygwin for windows installation, called XMLLINT.EXE.  The tool with format option did the trick for me. All I had to do is run following command,


d:\cygwin64\bin\xmllint.exe --format result_new.xml > result_format_new.xml

For the 125 MB XML file, the aforesaid command took approximately 5 minutes to complete the indentation. The indented XML was clearly opening in Liquid Studio and I was able to manually compare the portion of XML from two different files as my XML is not in specific order.

If you know of any tool which can compare Large XML file let me know that in comment section !

 

Leave a Reply

Your email address will not be published.

WP2Social Auto Publish Powered By : XYZScripts.com