我需要在 cfset 标记中使用 cfoutput 来获取要在 xml 中发送的多个行项目。我知道将 CF 标签放入另一个标签是错误的,但我正在寻找最好的方法来做到这一点。提前致谢。
<cfset soapBody = soapBody & "
<cfoutput query="getitems">
<item id=""#id#"">
<unitPrice>#getitems.unitprice#</unitPrice>
<quantity>#getitems.quantity#</quantity>
<productname>#getitems.productname#</productname>
<taxAmount>#getitems.taxamount#</taxAmount>
<unitOfMeasure>#getitems.unitofmeasure#</unitOfMeasure>
<taxRate>#getitems.taxrate#</taxRate>
<totalAmount>#getitems.totalamount#</totalAmount>
<grossNetIndicator>#getitems.grossnetindicator#</grossNetIndicator>
</item>
</cfoutput>
">