I have been using tidy on and off for a few years now and it’s been a great tool for finding problems with the html markup. I always wanted to use it for reformatting (cleaning up) output. Especially wanted it for reformatting xml output of some web services that have a nasty habit of putting the whole content on a single line.
But now I have found the right incantation:
View Code SH
$ cat source_file.xml | tidy -q -xml -i -w 300 > reformatted_file.xml |
Social Networking