title: How to manipulate svg using jsDom - node.js?
body: <p>I am having following <code>svg</code> file </p>
  
  <p><code>FileName :</code> seatLayout.svg</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  --&gt;
  &lt;!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt;
  &lt;svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="800px" height="600px" viewBox="0 0 800 600" enable-background="new 0 0 800 600" xml:space="preserve"&gt;
    &lt;g id="111"&gt;
       &lt;rect x="130" y= "130" height="320" width="550" id="rect1" fill ="white" stroke="blue" &gt;       &lt;/rect&gt;
    &lt;/g&gt;
  &lt;/svg&gt;
  </code></pre>
  
  <h3>Note</h3>
  
  <p>Technology/programming - node.js</p>
  
  <p>I want to append the text elements inside the <code>rect</code> element</p>
  
  <pre><code> &lt;text x="0" y="10" font-family="Verdana" font-size="55" fill="blue" &gt; Hello &lt;/text&gt;
  </code></pre>
  
  <p>I had tried to use <a href="https://github.com/tmpvar/jsdom" rel="nofollow">jsDOM</a> to achieve. But it is not working.</p>
  
  <pre><code> jsdom.env('seatLayout.svg', function (errors, window) {
      if(!errors){
         console.log(window.document.getElementById("rect1"));
      }
   });
  </code></pre>
  
  <h3>Problem</h3>
  
  <p>It is logging entire window object instead of <code>rect</code> element.</p>
  
  <p>Is it possible to manipulate svg using <a href="https://github.com/tmpvar/jsdom" rel="nofollow">jsDOM</a> ?</p>
  
  <p>Any suggestion will be grateful</p>