title: Use d3 to generate markup but not manipulate the DOM?
body: <p>Given the following code, I can append an svg circle to a body tag.</p>
  
  <pre><code>d3.select("body")
    .append("svg")
    .append("circle")
      .attr("cx", 30)
      .attr("cy", 30)
      .attr("r", 20);
  </code></pre>
  
  <p>But say I want to use d3 to just generate the markup:</p>
  
  <pre><code>&lt;svg&gt;&lt;circle cx="30" cy="30" r="20"/&gt;&lt;/svg&gt;
  </code></pre>
  
  <p>and assign it to a javascript variable to eventually be rendered on the page. In this case I don't want d3 to directly manipulate the DOM, but I want to use its magic to generate my markup.</p>
  
  <p>How do I go about this. </p>