How to export data into xml and then import that data also

hi all,
how to export the data into xml and then import that data also,

Regards
Sridevi

On 8/29/06, sridevi [email protected] wrote:

hi all,
how to export the data into xml and then import that data also,

xml = question.to_xml
new_question = Question.new(Hash.create_from_xml(xml))

jeremy

You can use the ROXML lib to achieve it. ROXML is a Ruby library
designed to make it easier for Ruby developers to work with XML. Using
simple annotations, it enables Ruby classes to be mapped to XML. ROXML
takes care of the marshalling and unmarshalling of mapped attributes so
that developers can focus on building first-class Ruby classes.

You can refer to http://roxml.rubyforge.org/#quickstart web site.

Easy to use.

sridevi wrote:

how to export the data into xml
and then import that data also,

I’m using Builder to write data from the database to an xml file and
then
REXML to read that xml file back into the database.

hth,
Bill