0

When I run:

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

I get

/private/var/folders/Aj/Aj9m3c8JGnmkccHY2o3lKE+++TI/Cleanup At Startup/Tidy XML.sh.S:1: parser error : Start tag expected, '<' not found question_autoSwitch ^ -:1: parser error : Document is empty

^ -:1: parser error : Start tag expected, '<' not found

Something is very wrong. :P

Any ideas?

bobber205
  • 241
  • 1
  • 6
  • 17
  • I don't know anything, but that hat pipe `|` looks out of place. did you mean to have another command after it or did you mean to escape it? – Zoredache Mar 18 '11 at 23:06
  • This is where I go the script http://magp.ie/2010/02/15/format-xml-with-textwrangler/ – bobber205 Mar 18 '11 at 23:20

1 Answers1

2

Try this instead:

#!/bin/bash
XMLLINT_INDENT=$'\t' xmllint --encode UTF-8 --format - $*
Ryan
  • 121
  • 2