title: MarkLogic: Converting an XML document into an XML string using XQuery
body: <p>I am using something like</p>
  
  <pre><code>let $x := 
   "&lt;root&gt;
   &lt;parent1&gt;value1&lt;/parent1&gt;
   &lt;parent2&gt;value2&lt;/parent2&gt;
   &lt;/root&gt;"
  ...
  </code></pre>
  
  <p>and converting the XML document to string. I wanted to pass an xml output from a function to another function as a string and not by hard coding it as I'm doing it right now.</p>
  
  <p>I tried using <code>fn:string</code>, but that doesn't pick up the xml tags as string.</p>