Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XML pretty printing?

78 views
Skip to first unread message

Chris McMahon

unread,
Jan 3, 2006, 2:10:31 PM1/3/06
to
Hi...

Is there something in Ruby that will make XML look nice on STDOUT?

-Chris

ara.t....@noaa.gov

unread,
Jan 3, 2006, 2:39:53 PM1/3/06
to

puts doc.pretty

-a
--
===============================================================================
| ara [dot] t [dot] howard [at] noaa [dot] gov
| all happiness comes from the desire for others to be happy. all misery
| comes from the desire for oneself to be happy.
| -- bodhicaryavatara
===============================================================================

James Britt

unread,
Jan 3, 2006, 2:44:16 PM1/3/06
to
Chris McMahon wrote:
> Hi...
>
> Is there something in Ruby that will make XML look nice on STDOUT?

REXML has a options for printing with nice indentation.

http://www.ruby-doc.org/stdlib/libdoc/rexml/rdoc/index.html

James

--

http://www.ruby-doc.org - Ruby Help & Documentation
http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
http://www.30secondrule.com - Building Better Tools


Chris McMahon

unread,
Jan 3, 2006, 3:23:33 PM1/3/06
to
the "pretty" method comes from where?

0 new messages