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.

def xml_import(self,
                   filepath=None,
                   xml_content = None,
                   markings=None,
                   identifier_ns_uri = None,
                   uid = None,
                   **kargs):

        """
        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.
         """


        # Reset bookkeeping dictionaries


        if not markings:
            markings = []
        if not identifier_ns_uri:
            identifier_ns_uri = DINGOS_DEFAULT_ID_NAMESPACE_URI

        self.__init__()

        # Carry out generic XML import
        import_result = DingoImporter.xml_import(xml_fname=filepath,
                                                 xml_content=xml_content,
                                                 ns_mapping=self.namespace_dict,
                                                 embedded_predicate=self.cybox_embedding_pred,
                                                 id_and_revision_extractor=self.id_and_revision_extractor)


        # Extract data required for creating info object

        id_and_rev_info = import_result['id_and_rev_info']
        elt_name = import_result['elt_name']
        elt_dict = import_result['dict_repr']
        file_content = import_result['file_content']

        if uid:
            id_and_rev_info['id'] = uid
        else:
            id_and_rev_info['id'] = hashlib.sha256(file_content).hexdigest()

        id_and_rev_info['timestamp'] = timezone.now()

        create_timestamp = id_and_rev_info['timestamp']

        iobject_family_name = self.namespace_dict.get(elt_dict.get('@@ns', None), DINGOS_GENERIC_FAMILY_NAME)

        iobject_family_revision_name = ''
        iobject_type_name = elt_name
        iobject_type_namespace_uri = self.namespace_dict.get(elt_dict.get('@@ns', None), DINGOS_GENERIC_FAMILY_NAME)

        # Create info object

        DingoImporter.create_iobject(iobject_family_name=iobject_family_name,
                                     iobject_family_revision_name=iobject_family_revision_name,
                                     iobject_type_name=iobject_type_name,
                                     iobject_type_namespace_uri=iobject_type_namespace_uri,
                                     iobject_type_revision_name='',
                                     iobject_data=elt_dict,
                                     uid=id_and_rev_info['id'],
                                     identifier_ns_uri=identifier_ns_uri,
                                     timestamp=id_and_rev_info['timestamp'],
                                     create_timestamp=create_timestamp,
                                     markings=markings,
                                     config_hooks={'special_ft_handler': self.ft_handler_list(),
                                                   'datatype_extractor': self.datatype_extractor},
                                     namespace_dict=self.namespace_dict,
        )