How to rename and xml element

Is there an easy way to rename an element within an XML file after I
have called object.to_xml?