title: Adding an element to a DOM document with batik
body: <p>Good evening,</p>
  
  <p>My problem is when adding an element (rectangle) to my DOM document.</p>
  
  <p>The addition is done as follows:</p>
  
  <p>Creating an element rect light blue / fluo</p>
  
  <pre><code>Node node = doc.createElement("rect");
  Element elem = (Element)node;
  elem.setAttribute("fill", obj.getColor());
  </code></pre>
  
  <p>Contained in a group of elements g</p>
  
  <pre><code>Node newZone = doc.createElement("g");
  Element elemZone = (Element)newZone;
  elemZone.setAttribute("id", zone);
  </code></pre>
  
  <p>Adding the element rect to the element g</p>
  
  <pre><code>elemZone.appendChild(elem);
  </code></pre>
  
  <p>Adding to the document</p>
  
  <pre><code>doc.getElementById(idUse).appendChild(elemZone);
  </code></pre>
  
  <p>Updating the document JSVGCanvas (which allows the display svg)</p>
  
  <pre><code>svg.setDocument(doc);
  </code></pre>
  
  <p>So also weird as it may seem, the change is taken into account, because when I save the document and displays the file, I see the change.</p>
  
  <p>But nothing in the application is updated.</p>
  
  <p>Also, I added an element (symbol + use) following the same process.
  JSVGCanvas and update the document is well considered and also visible.</p>
  
  <p>Thank you in advance for your help ...</p>
  
  <p>Remarks:
  - Repaint tested np times.
  - Launching the application with the document: The rectangle appears good.</p>