AnsweredAssumed Answered

Include comment in XOG file created in GEL?

Question asked by L.Elias Champion on May 5, 2014
Latest reply on May 5, 2014 by L.Elias

This is probably a strange question. I am using GEL to query SQL and cycle through some items to update and create XOG to write back in. All that is fine in good. I'd like to output the XML to a file on the system for tracking, and would like to include the old value as well as the new one for the update. Is it possible to include comments in the XML that is created? I tried just adding a comment line to the GEL but that (obviously, in retrospect) just commented the line out during processing and was not included. I tried using CDATA tags around the comment but that escaped the special characters and let with misformatted data.

Formatted code @ http://hastebin.com/ilihodekej.xml

<core:forEach items="${q_idea.rows}" var="row" indexVar="vn_index">

<!--########################################### -->
<!--Format looped data relevant into XOG format -->
<!--########################################### -->
<gel:parse var="idea_data">
<Idea name="${row.idea_name}" objectID="${row.idea_code}">
<CustomInformation>
<ColumnValue name="oh_idea_rank">${vn_index+1}</ColumnValue>
<!--Old Rank: ${row.idea_rank}-->
</CustomInformation>
</Idea>
</gel:parse>
<!--#################################-->
<!--Merge looped data into XOG shell -->
<!--#################################-->
<gel:set select="$v_xml_root/NikuDataBus/Ideas" value="${idea_data}" insert="true"/>
</core:forEach>

Outcomes