GoalModelEditor/FrontEnd/public/js/projectEdit/graphXML.js
/**
 * Renders the graph from a (saved) XML file.
 */
Renders the graph from a (saved) XML file.
Renders the graph from a ( saved ) XML file .
function renderFromXML(xml) {
    let doc = mxUtils.parseXml(xml);
    let codec = new mxCodec(doc);
    let elt = doc.documentElement.firstChild;
    let cells = [];
    while (elt != null) {
        cells.push(codec.decode(elt));
        elt = elt.nextSibling;
    }
    graph.addCells(cells);
}
function renderFromXML ( xml ) { let doc = mxUtils . parseXml ( xml ) ; let codec = new mxCodec ( doc ) ; let elt = doc . documentElement . firstChild ; let cells = [ ] ; while ( elt != null ) { cells . push ( codec . decode ( elt ) ) ; elt = elt . nextSibling ; } graph . addCells ( cells ) ; }
Renders the graph from a (saved) XML file.
Renders the graph from a ( saved ) XML file .
// console.log(xml); // console.log(doc); // console.log(codec); // console.log(elt);