private void createDOMTree(){
        Element rootEle = dom.createElement("table");
        dom.appendChild(rootEle);
        
        Element idsRoot = dom.createElement("vertexes");
        rootEle.appendChild(idsRoot);
        
        for (int i = 0; i < ids.size(); i++) {
            Element vertex = dom.createElement("vertex");
            vertex.setAttribute("zId", String.valueOf(i));
            vertex.setAttribute("code", SynchroState.codeToString(codes.get(i)));
            if(points != null && points.size() == ids.size()){
                vertex.setAttribute("x", String.valueOf(points.get(i).x));
                vertex.setAttribute("y", String.valueOf(points.get(i).y));
            }
            Text id = dom.createTextNode(ids.get(i));
            vertex.appendChild(id);
            idsRoot.appendChild(vertex);
        }
        
        Element condRoot = dom.createElement("conditions");
        rootEle.appendChild(condRoot);
        
        for (int i = 0; i < conditions.size(); i++) {
            Element cEl = addTextElement("condition", conditions.get(i));
            cEl.setAttribute("id", String.valueOf(i));
            condRoot.appendChild(cEl);
        }
        
        
        Element connRoot = dom.createElement("connections");
        rootEle.appendChild(connRoot);
        
        int i = 0;
        for(Connection nextConn: connections){
            Element connEle = createConnElement(nextConn , i);
            connRoot.appendChild(connEle);
            i++;
        }
        
    }