def __init__(self, metadata_to_parse=None, out_file_or_path=None, metadata_props=None, **metadata_defaults):
        """
        Initialize new parser with valid content as defined by get_parsed_content
        :see: get_parsed_content(metdata_content) for more on what constitutes valid content
        """

        self.has_data = False
        self.out_file_or_path = out_file_or_path

        self._xml_tree = None
        self._data_map = None
        self._data_structures = None
        self._metadata_props = set(metadata_props or _supported_props)

        if metadata_to_parse is not None:
            self._xml_root, self._xml_tree = get_parsed_content(metadata_to_parse)
        else:
            self._xml_tree = self._get_template(**metadata_defaults)
            self._xml_root = self._data_map['_root']

        self._init_metadata()
def __init__ ( self , metadata_to_parse = None , out_file_or_path = None , metadata_props = None , ** metadata_defaults ) : self . has_data = False self . out_file_or_path = out_file_or_path self . _xml_tree = None self . _data_map = None self . _data_structures = None self . _metadata_props = set ( metadata_props or _supported_props ) if metadata_to_parse is not None : self . _xml_root , self . _xml_tree = get_parsed_content ( metadata_to_parse ) else : self . _xml_tree = self . _get_template ( ** metadata_defaults ) self . _xml_root = self . _data_map [ '_root' ] self . _init_metadata ( )
Initialize new parser with valid content as defined by get_parsed_content
        :see: get_parsed_content(metdata_content) for more on what constitutes valid content