What Windows app can sort a huge XML file?
Posted
by
Torben Gundtofte-Bruun
on Super User
See other posts from Super User
or by Torben Gundtofte-Bruun
Published on 2011-11-08T13:23:17Z
Indexed on
2011/11/25
9:53 UTC
Read the original article
Hit count: 244
I have some enormous XML-based configuration files, with 125000 lines in them. The problem is that they are auto-generated by the system I use, and "child" tags are in a random order within their respective parent tag. This means that a diff comparison is impossible.
I want to recursively sort all tags within a parent tag by the value in name=""
. Some parent tags only appear once and don't have a name=""
parameter; these should be sorted by the tag
name itself.
Once the files are sorted like this, they can be compared quite easily using normal tools. We are currently using ExamXML which can match unsorted XML files, but it fails because the files are too big.
Is there an application that can do this? (Windows much preferred; Linux only as a last resort)
I do not want to dive into development or XSLT jobs. I am thinking that someone must have made a simple sorting tool like this already - I just can't find it using Google.
Update:
With help from this site, I created a small package that I want to share: XML-Sorter_v0.3.zip
Update: Follow-up question here.
© Super User or respective owner