Returns a BayesianModel or MarkovModel object depending on the
        type of ProbModelXML passed to ProbModelXMLReader class.

def create_probnet(self):
        """
        Returns a BayesianModel or MarkovModel object depending on the
        type of ProbModelXML passed to ProbModelXMLReader class.
        """
        self.probnet = {}
        # Add general properties
        probnet_elem = self.xml.find('ProbNet')
        self.probnet['type'] = probnet_elem.attrib['type']
        if probnet_elem.find('Comment') is not None:
            self.add_comment(probnet_elem.find('Comment').text)
        if probnet_elem.find('Language') is not None:
            self.add_language(probnet_elem.find('Language').text)
        if probnet_elem.find('AdditionalProperties') is not None:
            self.probnet['AdditionalProperties'] = {}
            for prop in probnet_elem.find('AdditionalProperties'):
                self.add_additional_property(self.probnet['AdditionalProperties'], prop)

        # Add additional Constraints
        self.probnet['AdditionalConstraints'] = {}
        for constraint in probnet_elem.findall('AdditionalConstraints/Constraint'):
            self.add_probnet_additionalconstraints(constraint)

        # Add Decision Criterion
        self.probnet['DecisionCriteria'] = {}
        for criterion in probnet_elem.findall('DecisionCriteria/Criterion'):
            self.add_criterion(criterion)

        # Add nodes
        self.probnet['Variables'] = {}
        for variable in probnet_elem.find('Variables'):
            self.add_node(variable)

        # Add edges
        self.probnet['edges'] = {}
        for edge in probnet_elem.findall('Links/Link'):
            self.add_edge(edge)

        # Add CPD
        self.probnet['Potentials'] = []
        for potential in probnet_elem.findall('Potentials/Potential'):
            probnet_dict = {}
            self.add_potential(potential, probnet_dict)
            self.probnet['Potentials'].append(probnet_dict)