martedì 2 agosto 2011

Indentare XML

Con l'editor freeware PSPAD che trovate al seguente link
formattare con una bella indentazione i file XML è semplicissimo.


Al seguente link
ho trovato le impostazioni che vedete sotto.

Per utilizzarle in PSPAD è sufficiente scegliere:
HTML -> TiDy -> Modifica
e aggiungerle in fondo al file di configurazione di TiDy.

Salvare e adesso nel menù di TiDy (HTML -> TiDy) l'ultima scelta sarà
TiDy formatta XML
che indenterà correttamente il file XML

[TiDy formatta XML]
add-xml-decl:yes
add-xml-pi:yes
alt-text:Image
break-before-br:no
doctype:AUTO
drop-empty-paras:no
drop-font-tags:yes
fix-bad-comments:yes
hide-endtags:no
char-encoding:raw
indent:yes
indent-spaces:2
input-xml:yes
output-xml:yes
quiet:yes
tidy-mark:no
uppercase-attributes:no
uppercase-tags:no
word-2000:no
wrap:100
wrap-asp:yes
wrap-attributes:yes
wrap-jste:yes
wrap-php:yes
write-back:yes