[xsl] XML pretty printer

Subject: [xsl] XML pretty printer
From: John Christopher <john.christopher1100@xxxxxxxxx>
Date: Mon, 26 Sep 2011 14:25:10 -0700 (PDT)
I am looking for a stylesheet (or free software
that runs from the command line on linux) that
will take the following input:

<mydata attrib1="hello" attrib2="world"
attrib3="yes"
>
<person name="Fred" country="US" />
<person name="Karen" country="DE" />
</mydata>


and pretty prints it like this (each attribute
printed on a separate line beneath the element
and indented):


<mydata
    attrib1="hello"
    attrib2="world"
    attrib3="yes"
>
    <person
        name="Fred"
        country="US"
    />
    <person
        name="Sylvia"
        country="DE"
    />
</mydata>

Any ideas?  Thanks for your help.

Current Thread