public void loadRepositoryFromGraphXML(String graphXML) {
          try {
            Document document = builder.parse(new InputSource(new StringReader(graphXML)));

            // SBModel is sign of SystemBiology XML document, which equals to GraphData of PathCase.
            NodeList graphroots = document.getElementsByTagName("GraphData");

            Node graphroot = graphroots.item(0);

            NodeList graphElements = graphroot.getChildNodes();
            for (int i = 0; i < graphElements.getLength(); i++) {
                Node graphElement = graphElements.item(i);

                // GraphData/Molecules
                if (graphElement.getNodeName().equals("Compartments")) {
                    loadCompartmentFromXMLNode(graphElement);
                }
                // GraphData/GenericProcesses
                else if (graphElement.getNodeName().equals("Reactions")) {
                    loadReactionsFromXMLNode(graphElement);
                }
//                // GraphData/Pathways
                else if (graphElement.getNodeName().equals("Pathways")) {
                    loadPathwayFromXMLNode(graphElement);
                }
            }
        } catch (SAXException sxe) {
            // Error generated during parsing
            Exception x = sxe;
            if (sxe.getException() != null)
                x = sxe.getException();
            //x.printStackTrace();

        } catch (IOException ioe) {
            // I/O error
            ioe.printStackTrace();

        }
    }