The to_xml method returns a string containing the document in XML format.
to_xml
to_xml()
(String). Returns the document as a string.