title: create graph using custom xml on javascript
body: <p>I have a simple server - client architecture.
  I would like to create mxgraph using custom xml on client side with javascript.
  Here is the structure of my xml:</p>
  
  <pre><code>&lt;mycustomroot&gt;
  &lt;!-- some not mxgraph related tags --&gt;
  &lt;some-custom-tag&gt;
   ......
  &lt;/some-custom-tag&gt;
  
  &lt;!-- this is standard mxgraph model--&gt;
  &lt;mxGraphModel&gt;
    ......
  &lt;/mxGraphModel&gt;
  
  &lt;!-- this is standard mxgraph stylesheet--&gt;
  &lt;mxStylesheet&gt;
    .....
  &lt;/mxStylesheet&gt;
  &lt;/mycustomroot&gt;
  </code></pre>
  
  <p>My first question is:
  How can I create from this xml a graph?
  (I dont want to write custom parser, because everything in  is standards mxgraph.)
  I would like to do something like:</p>
  
  <p>dec.decode(node, graph.getModel());</p>
  
  <p>(where the node is the mxgraphmodel tag in the xml.)</p>
  
  <p>The second question is:
  I would like to use icons, which are sent by the server as text based byte array.
  In the mxConstants the STYLE_IMAGE description is not really useful.</p>
  
  <p>Thanks your answers in advance!</p>