Is there any way to pretty print an HTML or XML string from the command line on a mac? Trying to do this in Ruby. Any ideas? I've thought about XSLT, and about writing my own parser, but both of those are pretty involved. Looking for something already out there.
                +2 
                A: 
                
                
              
            XML files
xmllint --format file.xml
HTML files
xmllint --format --html file.html
http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/xmllint.1.html
                  Ivan Kruchkoff
                   2010-07-30 22:59:46