<div dir="ltr">There&#39;s some info on controlling serialization here:  <a href="https://help.marklogic.com/knowledgebase/article/View/328/0/xml-serialization-and-output-options">https://help.marklogic.com/knowledgebase/article/View/328/0/xml-serialization-and-output-options</a><div><br></div><div>/ch</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 2, 2017 at 1:45 PM, Kari Cowan <span dir="ltr">&lt;<a href="mailto:KCowan@alm.com" target="_blank">KCowan@alm.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_837251034153955361WordSection1">
<p class="MsoNormal">I have a query the returns an RSS output implementation with some custom nodes.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I need to insert &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; ahead of the &lt;rss version..&gt; declaration.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I found this article from 2009 but wanted to check if there was another way or newer simpler approach I could do directly in the xQuery.  Any ideas?<u></u><u></u></p>
<p class="MsoNormal"><a href="http://markmail.org/message/kwu24lbcdrt2dcim" target="_blank">http://markmail.org/message/<wbr>kwu24lbcdrt2dcim</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">let $rss:=<u></u><u></u></p>
<p class="MsoNormal">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;rss version=&quot;2.0&quot; xmlns:dc=&quot;<a href="http://purl.org/dc/elements/1.1/" target="_blank">http://purl.org/dc/<wbr>elements/1.1/</a>&quot; xmlns:media=&quot;<a href="http://search.yahoo.com/mrss/" target="_blank">http://search.<wbr>yahoo.com/mrss/</a>&quot; xmlns:content=&quot;<a href="http://purl.org/rss/1.0/modules/content/" target="_blank">http://purl.<wbr>org/rss/1.0/modules/content/</a>&quot; xmlns:atom=&quot;<a href="http://www.w3.org/2005/Atom" target="_blank">http://www.w3.org/<wbr>2005/Atom</a>&quot;
 xmlns:sailthru=&quot;<a href="http://www.sailthru.com/rss-extension" target="_blank">http://www.<wbr>sailthru.com/rss-extension</a>&quot;&gt;<u></u><u></u></p>
<p class="MsoNormal">  &lt;channel&gt;<u></u><u></u></p>
<p class="MsoNormal">    &lt;title&gt;{$title}&lt;/title&gt;<u></u><u></u></p>
<p class="MsoNormal">    &lt;description&gt;{$desc}&lt;/<wbr>description&gt;<u></u><u></u></p>
<p class="MsoNormal">    &lt;atom:link href=&quot;{$link}&quot; rel=&quot;self&quot; type=&quot;application/rss+xml&quot; /&gt;<u></u><u></u></p>
<p class="MsoNormal">                {$output}<u></u><u></u></p>
<p class="MsoNormal">&lt;/channel&gt;&lt;/rss&gt;<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Returns:<u></u><u></u></p>
<p class="MsoNormal" style="background:white;vertical-align:baseline"><b><span style="font-size:10.5pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#222222">[1.0-ml] XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected Version_<u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:black;background:white">67.<span class="m_837251034153955361apple-converted-space"> </span></span><span style="font-size:10.0pt;font-family:Consolas;color:black"><br>
<span style="background:white">68. let $rss:=</span><br>
</span><span class="m_837251034153955361error-line"><span style="font-size:10.0pt;font-family:Consolas;color:red;border:none windowtext 1.0pt;padding:0in;background:white">69. &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;rss</span></span><span class="m_837251034153955361apple-converted-space"><span style="font-size:10.0pt;font-family:Consolas;color:red;border:none windowtext 1.0pt;padding:0in;background:white"> </span></span><span class="m_837251034153955361errorchar"><span style="font-size:10.0pt;font-family:Consolas;color:white;border:none windowtext 1.0pt;padding:0in;background:red">v</span></span><span class="m_837251034153955361error-line"><span style="font-size:10.0pt;font-family:Consolas;color:red;border:none windowtext 1.0pt;padding:0in;background:white">ersion<wbr>=&quot;2.0&quot;
 xmlns:dc=&quot;<a href="http://purl.org/dc/elements/1.1/" target="_blank">http://purl.org/dc/<wbr>elements/1.1/</a>&quot; xmlns:media=&quot;<a href="http://search.yahoo.com/mrss/" target="_blank">http://search.<wbr>yahoo.com/mrss/</a>&quot; xmlns:content=&quot;<a href="http://purl.org/rss/1.0/modules/content/" target="_blank">http://purl.<wbr>org/rss/1.0/modules/content/</a>&quot; xmlns:atom=&quot;<a href="http://www.w3.org/2005/Atom" target="_blank">http://www.w3.org/<wbr>2005/Atom</a>&quot; xmlns:sailthru=&quot;<a href="http://www.sailthru.com/rss-extension" target="_blank">http://www.<wbr>sailthru.com/rss-extension</a>&quot;&gt;</span></span><u></u><u></u></p>
</div>
</div>

<br>______________________________<wbr>_________________<br>
General mailing list<br>
<a href="mailto:General@developer.marklogic.com">General@developer.marklogic.<wbr>com</a><br>
Manage your subscription at:<br>
<a href="http://developer.marklogic.com/mailman/listinfo/general" rel="noreferrer" target="_blank">http://developer.marklogic.<wbr>com/mailman/listinfo/general</a><br>
<br></blockquote></div><br></div>