Saturday, September 25, 2010

Reformatting XML with TextWrangler Script

Here's a great tip for reformatting XML. I'm reposting this. I use TextWrangler and use the UNIX Script.

Use Unix Filters and create the following script to use, Reformat XML.sh:

#!/bin/sh
xmllint --c14n "$*" | XMLLINT_INDENT=$'\t' xmllint --format -

Thanks Magpie.


No comments: