sortxml (week #22)
Tuesday, May 28, 2013
							Labels:
							
Application of the Week 2013
									,
								
Utility
It is simple to use.
USAGE: sortxml.exe [options] infile [outfile]
  infile      The name of the file to sort, etc.
  outfile     The name of the file to save the output to.
              If this is omitted, then the output is written to stdout.
OPTIONS:
  --pretty    Ignores the input formatting and makes the output look nice.
  --sort      Sort both the nodes and attributes.
  --sortnode  Sort the nodes.
  --sortattr  Sort the attributes.
(prefix an option with ! to turn it off.)The default is to output pretty and sorted nodes and attributes. So, given the following:
    $ type sample.xml
    <root><node attr="name" value="one"></node></root>    $ sortxml.exe sample.xml
    <root>
        <node attr="name" value="one">
        </node>
    </root>    Helpers\sortxml.exe --pretty --sortnode --!sortattr %s %tCheck out the source code at GitHub!