def define_xml_path(path):
 try:
  with salt.utils.fopen(path, 'r') as fp_:
   return define_xml_str(fp_.read())
 except (OSError, IOError):
  return False

def define_xml_path ( path ) : try : with salt . utils . fopen ( path , 'r' ) as fp_ : return define_xml_str ( fp_ . read ( ) ) except ( OSError , IOError ) : return False
define a domain based on the xml-file path passed to the function cli example: .