code: def DOM_node_to_XML(tree, xml_declaration=True):
      
      result = ET.tostring(tree, encoding='utf8', method='xml').decode('utf-8')
      if not xml_declaration:
          result = result.split("<?xml version='1.0' encoding='utf8'?>\n")[1]
      return result
docs: Prints a DOM tree to its Unicode representation.
  
      :param tree: the input DOM tree
      :type tree: an ``xml.etree.ElementTree.Element`` object
      :param xml_declaration: if ``True`` (default) prints a leading XML
          declaration line
      :type xml_declaration: bool
      :returns: Unicode object