venerdì 8 aprile 2011

Format XML string with Mac OS X

Switching from Linux and Windows to Mac OS X sometimes is not easy. And, if I can say, it's not even worthy, as Mac OS X is not so wonderful as many people say.
Anyway, I had to switch, and I'm learning how to do some things that I used to do before with my new Mac.

So, to keep it short, with Mac Os X there is a useful CLI utility to format an XML string. You can even format something that is in your clipboard and put it back in teh clipboard.

This is the command:

pbpaste | xmllint --format - | pbcopy

Nessun commento: