/tmp/tidyxml.conf < /tmp/tidyxml.conf <

Formatting XML documents with Gedit and Tidy

In “Manage External Tools” add the following script to format xml documents using tidy:

#!/bin/sh
cat > /tmp/tidyxml.conf <<EOS
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
EOS
tidy -config /tmp/tidyxml.conf

Gedit manage external tools screenshot

blog comments powered by Disqus