title: Create XML in JavaScript
body: <p>Is it possible to create an XML file with some data in JavaScript? I have the data stored in variables.</p>
  <p>I've googled around a bit and it doesn't seem like it's talked about much. I thought I could use <code>XMLWriter</code> such as this:</p>
  <pre><code>var XML = new XMLWriter();
  XML.BeginNode (&quot;testing&quot;);
  XML.Node(&quot;testingOne&quot;);
  XML.Node(&quot;TestingTwo&quot;);
  XML.Node(&quot;TestingThree&quot;);
  XML.EndNode();
  </code></pre>
  <p>as stated in this tutorial: <a href="http://www.ehow.com/how_5956065_create-xml-file-javascript.html" rel="noreferrer">EHow Tutorial</a></p>
  <p>However, when I execute this code, I get the following error:</p>
  <blockquote>
  <p>ReferenceError: XMLWriter is not defined</p>
  </blockquote>
  <p>How can I solve this error?</p>