Rexml/document

Now i using rexml/document to retrieve the xml file data. But i don know
how to update the file contents. Who know the coding?Can provide some
sample code? Thanks…