docs: def dict_to_xml(spec, full_document=False):
      """
      Convert dict to XML
  
      Args:
          spec(dict): dict to convert
          full_document(bool): whether to add XML headers
  
      Returns:
          lxml.etree.Element: XML tree
      """
  
      middle = xmltodict.unparse(spec, full_document=full_document, pretty=True)
      return lxml.etree.fromstring(middle)