Pretty Printing XML using Ruby
Here is some code to pretty print using Ruby.
require 'rexml/document' REXML::Document.new(open(ARGV[0]).read).write($stdout, 4)
Just stick it in a xml_pp.rb
file
chmod +x and go.
Here is some code to pretty print using Ruby.
require 'rexml/document' REXML::Document.new(open(ARGV[0]).read).write($stdout, 4)
chmod +x and go.