On Aug 17, 2005, at 7:04 AM, Christian Neukirchen wrote:
>
> ruby myxmloutput | xmllint --format -
Or, with XML Starlet[1]:
ruby myxmloutput | xml fo
And, one of my favorite IRB recipes:
irb(main):001:0> require 'net/http'
irb(main):002:0> url = 'http://example.com/some.xml'
irb(main):003:0> xml = Net::HTTP.get(URI.parse(url))
irb(main):004:0> IO.popen('pbcopy', 'w') { |io| io.write(xml) }
pbcopy puts text in the clipboard on OS X. Cygwin has a similar
command called getclip. Not sure what's available for Linux. Its
pretty durn handy though!
[1] http://xmlstar.sourceforge.net/
--
~akk
http://therealadam.com