title: Define Parent after initializing elements via GraphML
body: <p>I like to work with components which can be defined via the parent property (<a href="https://js.cytoscape.org/#notation/compound-nodes" rel="nofollow noreferrer">https://js.cytoscape.org/#notation/compound-nodes</a>)</p>
  
  <p>However, I do not define my network graph by hand my load a graphml-file via cytoscape.js-graphml:</p>
  
  <pre><code>    var cy = window.cy = cytoscape({
      container: document.getElementById('cy'),
       ready: function () {
           this.graphml({layoutBy: 'random'});
           this.graphml(graphStr);
       }
      });
  </code></pre>
  
  <p>The graphml file looks like :</p>
  
  <p>
  
  <pre><code>on='1.0' encoding='utf-8'?&gt;
  &lt;graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"&gt;&lt;key attr.name="relationship" attr.type="string" for="edge" id="d8"/&gt;
  
  &lt;key attr.name="node_name" attr.type="string" for="node" id="d0"/&gt;
  &lt;key attr.name="parent" attr.type="long" for="node" id="d1"/&gt;
  &lt;graph edgedefault="directed"&gt;
  &lt;node id="123"&gt;
    &lt;data key="d0"&gt;First&lt;/data&gt;
    &lt;data key="d1"&gt;0&lt;/data&gt;
  &lt;/node&gt;
  &lt;node id="124"&gt;
    &lt;data key="d0"&gt;Second&lt;/data&gt;
    &lt;data key="d1"&gt;1&lt;/data&gt;
  &lt;/node&gt;
  ...
  </code></pre>
  
  <p>Where d1 indicates the parent/component id.
  The question is, how do I define the parent variable of a node afterward. The graphml is automatically generated and can not be modified.</p>
  
  <p>THX
  Lazloo</p>