def xml_import(self,<EOL>filepath=None,<EOL>xml_content = None,<EOL>markings=None,<EOL>identifier_ns_uri = None,<EOL>uid = None,<EOL>**kargs):
<EOL>if not markings:<EOL><INDENT>markings = []<EOL><DEDENT>if not identifier_ns_uri:<EOL><INDENT>identifier_ns_uri = DINGOS_DEFAULT_ID_NAMESPACE_URI<EOL><DEDENT>self.__init__()<EOL>import_result = DingoImporter.xml_import(xml_fname=filepath,<EOL>xml_content=xml_content,<EOL>ns_mapping=self.namespace_dict,<EOL>embedded_predicate=self.cybox_embedding_pred,<EOL>id_and_revision_extractor=self.id_and_revision_extractor)<EOL>id_and_rev_info = import_result['<STR_LIT>']<EOL>elt_name = import_result['<STR_LIT>']<EOL>elt_dict = import_result['<STR_LIT>']<EOL>file_content = import_result['<STR_LIT>']<EOL>if uid:<EOL><INDENT>id_and_rev_info['<STR_LIT:id>'] = uid<EOL><DEDENT>else:<EOL><INDENT>id_and_rev_info['<STR_LIT:id>'] = hashlib.sha256(file_content).hexdigest()<EOL><DEDENT>id_and_rev_info['<STR_LIT>'] = timezone.now()<EOL>create_timestamp = id_and_rev_info['<STR_LIT>']<EOL>iobject_family_name = self.namespace_dict.get(elt_dict.get('<STR_LIT>', None), DINGOS_GENERIC_FAMILY_NAME)<EOL>iobject_family_revision_name = '<STR_LIT>'<EOL>iobject_type_name = elt_name<EOL>iobject_type_namespace_uri = self.namespace_dict.get(elt_dict.get('<STR_LIT>', None), DINGOS_GENERIC_FAMILY_NAME)<EOL>DingoImporter.create_iobject(iobject_family_name=iobject_family_name,<EOL>iobject_family_revision_name=iobject_family_revision_name,<EOL>iobject_type_name=iobject_type_name,<EOL>iobject_type_namespace_uri=iobject_type_namespace_uri,<EOL>iobject_type_revision_name='<STR_LIT>',<EOL>iobject_data=elt_dict,<EOL>uid=id_and_rev_info['<STR_LIT:id>'],<EOL>identifier_ns_uri=identifier_ns_uri,<EOL>timestamp=id_and_rev_info['<STR_LIT>'],<EOL>create_timestamp=create_timestamp,<EOL>markings=markings,<EOL>config_hooks={'<STR_LIT>': self.ft_handler_list(),<EOL>'<STR_LIT>': self.datatype_extractor},<EOL>namespace_dict=self.namespace_dict,<EOL>)<EOL>
Call this function for generic import of an XML file with the following arguments:

- filename: Path to XML file
- markings (optional): List of information objects with which the imported object
  should be marked
- identifier_ns_uri: Namespace of the identifiers, if identifiers are to be created
- uid (optional): unique identifier -- if none is given, the SHA256 of the file
  contents are used as identifier.