Archive for the ‘Uncategorized’ Category

Pretty printing XML with xmllint

Posted on December 10th, 2010 in Uncategorized | No Comments »

Today I was debugging some long XML responses and I went online to find a pretty printer so that I could read them easier. A quick Google search turns up a decent XML beautifier: http://xmlbeautifier.com/default.aspx

Unfortunately one XML response in particular was over 200kb which choked the above parser. I searched for 5-minutes and couldn’t find another one that didn’t require downloading and setting up. My next bet was to ask the geniuses in the irc #emacs channel if this is something emacs might do and got a quick answer: Use xmllint.

I did a quick check if I have this program with which xmllint on both my OS X machine and my remote Centos server – sure enough it was there. Here’s how to use it:

Just dump your xml in a text file (xml.txt) and run the following:

xmllint -format xml.txt --output xml2.txt

Additionally, if you’re a TextMate user you can just go to BUNDLE > XML > Tidy.

TeamViewer constantly crashing?

Posted on January 8th, 2010 in Uncategorized | 1 Comment »

If you suddendly find your TeamViewer crashing every time you open it simply delete it’s plist file and you’re good to go:

/Users/<YourName>/Library/Preferences/com.TeamViewer.settings.plist

Thanks to Christian H├Ągele (of TeamViewer) for the fix.