title: ColdFusion convert query to XML
body: <p>The code below generates XML items from a query just fine, but everything I add it to the API I get a parse error and I don't know where I'm going wrong.</p>
  <pre><code>&lt;cfsavecontent variable=&quot;getlineitems&quot;&gt;
      &lt;cfoutput query=&quot;ccitems&quot;&gt;    
      &lt;cfset idreset = (#currentrow# - 1) /&gt;
      &lt;item id=&quot;#idreset#&quot;&gt;
          &lt;unitPrice&gt;#Trim(XMLFormat(ccitems.unitprice))#&lt;/unitPrice&gt;
          &lt;quantity&gt;#Trim(XMLFormat(ccitems.quantity))#&lt;/quantity&gt;
          &lt;productname&gt;#Trim(XMLFormat(ccitems.productname))#&lt;/productname&gt;
          &lt;taxAmount&gt;#Trim(XMLFormat(ccitems.taxamount))#&lt;/taxAmount&gt;
          &lt;totalAmount&gt;#Trim(XMLFormat(ccitems.totalamount))#&lt;/totalAmount&gt;
          &lt;grossNetIndicator&gt;N&lt;/grossNetIndicator&gt;
          &lt;taxRate&gt;#Trim(XMLFormat(ccitems.taxrate))#&lt;/taxRate&gt;
          &lt;productCode&gt;801418&lt;/productCode&gt;
          &lt;unitOfMeasure&gt;each&lt;/unitOfMeasure&gt;
          &lt;commodityCode&gt;801418&lt;/commodityCode&gt;
          &lt;dutyAmount&gt;0.00&lt;/dutyAmount&gt;
          &lt;discountAmount&gt;0&lt;/discountAmount&gt;
          &lt;discountIndicator&gt;N&lt;/discountIndicator&gt;
      &lt;/item&gt;
      &lt;/cfoutput&gt;
  &lt;/cfsavecontent&gt;
  &lt;cfdump var=&quot;#getlineitems#&quot; /&gt;
  &lt;cfabort /&gt;
  </code></pre>