AnsweredAssumed Answered

Delete XML attribute using GEL

Question asked by helloworld on Sep 14, 2012
Latest reply on Sep 16, 2012 by helloworld
[font=Arial][size=2][size]Hi,
Does anyone know a way to delete an attribute from a XML node using GEL?

I have this below sample XML,
<TimeSheetEntry assignmentEstimate="0"




assignmentEstimateForTimePeriod="0"




assignmentFinish="2012-06-28T17:00:00"




assignmentID="5028453"




assignmentPendingEstimate="0"




assignmentStart="2012-06-06T08:00:00"




internalTaskID="5029205">




<DailyActuals>





<Actual actualDate="2012-06-25" amount="0"/>





</DailyActuals>



</TimeSheetEntry>

I want to delete the attributes which start with assignment. I know using <gel:set insert="true" select="$xml/TimeSheetEntry@newAttribute " value="${}"/> you can insert a new attribute.

However, I want to remove an attribute here.

Any Ideas?

Many Thanks,

Leo.
[font]

Outcomes