Removed duplicate write_xml method.