Kalman Noel
10/29/2006 8:18:00 AM
Pau Garcia i Quiles:
> xml = REXML::Element.new('parent')
> xml.add_xml_element('<child><attrib1>value1</attrib1><attrib2>value2</attrib2></child>')
>
> Then xml.to_s would output:
> <parent><child><attrib1>value1</attrib1><attrib2>value2</attrib2></child></parent>
# »Element« for creating tags:
parent = REXML::Element.new('parent')
# »Document« for XML input:
child = REXML::Document.new('<child><attrib1>value1</attrib1></child>')
parent << child
parent.to_s
Kalman