Forum: Ruby XML pretty printing?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ea97ad3789541367331966f009f549cb?d=identicon&s=25 Chris McMahon (Guest)
on 2006-01-03 20:15
(Received via mailing list)
Hi...

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

-Chris
Cb48ca5059faf7409a5ab3745a964696?d=identicon&s=25 unknown (Guest)
on 2006-01-03 20:42
(Received via mailing list)
On Wed, 4 Jan 2006, Chris McMahon wrote:

> Hi...
>
> Is there something in Ruby that will make XML look nice on STDOUT?
>
> -Chris

puts doc.pretty

-a
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 James Britt (Guest)
on 2006-01-03 20:46
(Received via mailing list)
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
Ea97ad3789541367331966f009f549cb?d=identicon&s=25 Chris McMahon (Guest)
on 2006-01-03 21:31
(Received via mailing list)
the "pretty" method comes from where?
This topic is locked and can not be replied to.