title: Coying an entire xml in a Variable using xslt
body: <p>How can i copy an entire  xml as is in an Variable? </p>
  
  <p>Below is the sample xml:</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
        &lt;products author="Jesper"&gt;
           &lt;product id="p1"&gt;
              &lt;name&gt;Delta&lt;/name&gt;
              &lt;price&gt;800&lt;/price&gt;
              &lt;stock&gt;4&lt;/stock&gt;
           &lt;/product&gt;
        &lt;/products&gt;
  </code></pre>
  
  <p>I have tried below xslt but it is not working.</p>
  
  <pre><code>     &lt;?xml version="1.0" encoding="UTF-8"?&gt;
          &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"&gt;
          &lt;xsl:output method="xml" indent="yes"/&gt;
          &lt;xsl:template match="@*|node()"&gt;
              &lt;xsl:variable name="reqMsg"&gt;
                  &lt;xsl:copy&gt;
                     &lt;xsl:apply-templates select="@*|node()"/&gt;
                  &lt;/xsl:copy&gt;
             &lt;/xsl:variable&gt;
         &lt;xsl:copy-of select="$reqMsg"/&gt;
      &lt;/xsl:template&gt;
     &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>Regards,
  Rahul</p>