title: copy XML using XSLT into JSON
body: <p>I would like to copy XML using XSLT into JSON. </p>
  
  <p>The  JSON result would look like this:</p>
  
  <pre><code> callback( {"xml":"
   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;root&gt;
   ...
   &lt;/root&gt;
   "})
  </code></pre>
  
  <p>and my XSLT so far: </p>
  
  <pre><code> &lt;xsl:template match="/"&gt;
     &lt;xsl:text&gt;callback( {"xml":"&lt;/xsl:text&gt;
      &lt;xsl:copy-of  select="*"/&gt;
     &lt;xsl:text&gt;"} )&lt;/xsl:text&gt;
   &lt;/xsl:template&gt;
  </code></pre>
  
  <p>Anyone has an idea what else, besides quotes, I have to replace and how to replace? I would like to load and parse the XML file in Javascript?</p>
  
  <p>Thanks a lot,<br/>
  Ralph</p>