We are trying to use a GEL script to copy the allocations from an idea to a project.
Via XOG the allocations of an idea retrieved in a variable called XOGoutcome, after which a new XML is formed using the script below:
<gel:parse escapeText="false" var="XOGBody2">
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">
<Header version="6.0.11" action="write" objectType="project" externalSource="NIKU"/>
<Projects>
<Project name="ProjName" projectID="ProjID">
<Resources>
<gel:forEach select="$runresult/SOAP-ENV:Envelope/SOAP-ENV:Body/NikuDataBus/Ideas/Idea/InvestmentResources/Resource" var="outputnode">
<gel:set asString="true" escapeText="true" select="$outputnode" var="v_resource"/>
${v_resource}
</gel:forEach>
</Resources>
</Project>
</Projects>
</NikuDataBus>
</gel:parse>
After invoking this XML via soap a call, the call returns a failure, stating : "[Error] :0:0: unexpected character literal"
When writing the XML (XOGBody2) to the log, the result is:
<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd">
<Header action="write" externalSource="NIKU" objectType="project" version="6.0.11" />
<Projects>
<Project name="ProjName" projectID="ProjID">
<Resources>
<Resource availFrom="2014-11-01T00:00:00" availTo="2015-01-01T00:00:00" bookingStatus="5" capitalPercentage="0" defaultAllocation="1" isProjectManager="false" lastUpdatedBy="1" lastUpdatedDate="2014-11-18T14:43:02" openForTimeEntry="true" projectRoleID="csk.businessAnalyst" resourceID="csk.businessAnalyst" teamId="csk.businessAnalyst">
<AllocCurve />
<CustomInformation>
<ColumnValue name="partition_code">NIKU.ROOT</ColumnValue>
</CustomInformation>
</Resource>
</Resources>
</Project>
</Projects>
</NikuDataBus>
So the node we paste from the original XML in the new XML has < in stead of < and > in stead of >.
How can I paste the node form the original XML in a new XML correctly so that the new XML works?
Thanks in advance for your advice.