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?

2

Try this instead:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.