PERL_CONVERT="use XML::Simple; print XMLout(XMLin('-', KeepRoot => 1), AttrIndent => 1, KeepRoot => 1, XMLDecl => '');"
To be used like this :
/usr/bin/perl -e "$PERL_CONVERT" > $TMPFILE
Whatever input you have (in XML), the goal is to have a "comparable" ouptut that will respect the XML structure :
FROM:
TO:
attr1="value1"
attr2="value2"
...
attr3="value3"
>
...
...
Specifically, this is really useful if you need to merge 2 different versions of your XML file, like for example in SVN.
Aucun commentaire:
Enregistrer un commentaire