Hi
Anyone have or can point me to a snippet that will convert an entire xml
file
in the form of a continuous string into a well formatted file?
Thanks
David
Hi
Anyone have or can point me to a snippet that will convert an entire xml
file
in the form of a continuous string into a well formatted file?
Thanks
David
On Nov 3, 3:46 pm, David S. [email protected] wrote:
Anyone have or can point me to a snippet that will convert an entire xml file
in the form of a continuous string into a well formatted file?
Slim2:~ phrogz$ irb
rirb(main):001:0> require ‘rexml/document’
=> true
irb(main):002:0> doc = REXML::Document.new “yow</
foo>”
=> … </>
irb(main):003:0> doc.to_s
=> “yow”
irb(main):004:0> doc.write( $stdout, 2 )
yow
=> [<?xml ... ?>, … </>]
irb(main):005:0> doc.write( $stdout, 4 )
yow
=> [<?xml ... ?>, … </>]
For more, see:
http://www.germane-software.com/software/rexml/docs/tutorial.html
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs