xsl-list
[Top] [All Lists]

[xsl] XML pretty printer

2011-09-26 16:25:18
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.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>