require 'xtemplate'
require 'xtemplate/yaml'

doc = XTemplate::XMLDocument.new(<<EOS)
<?xml version="1.0"?>
<members>
  <member uid="&amp;1">
    <name>&amp;name1</name>
    <age>27</age>
  </member>
  <member uid="&amp;2">
    <name>&amp;name2</name>
    <age>20</age>
  </member>
</members>
EOS

print(doc.to_s,"\n\n")
print(doc.to_yaml,"\n\n")
print(doc.to_s,"\n")
