Builder::XmlMarkup.new( :target => address, :indent => 1 )
#!/usr/bin/env ruby
require 'rubygems'
require 'builder'
address = <<XML
<address>
<name><given>M</given><family>M</family></name>
<street>St.</street>
<city>G</city>
<state>C</state>
<code>81</code>
<country>USA</country>
</address>
XML
document = Builder::XmlMarkup.new( :target => address, :indent => 1 )
puts document.to_xs
Related examples in the same category