AnsweredAssumed Answered

GEL - Xpath How to modify/delete an attribute inside a node?

Question asked by vidfe01 Employee on Nov 25, 2015
Latest reply on Nov 26, 2015 by gcubed

Hi all,


I am having troubles to modify/delete an attribute inside a node in XML using Xpath.
This is what I have:


<gel:set select="$xog_template//Tasks/Task[@taskID=$thisExtId]" var="taskEntry"/>                                   1) Select a node from xog_template

<gel:set insert="true" select="$xogRequest//Tasks" value="${taskEntry}"/>                                                   2) Insert the node in xogRequest

<gel:set asString="true" select="$xogRequest//Tasks/Task/@nextSiblingOf" var="sibling"/>                         3) Extract the attribute nextSiblingOf into variable sibling

<core:if test="${sibling == '0'}">                                                                                                                        4) Check the value of sibling

     <******>                                                                                                                                                  5) Delete the attribute nextSiblingOf or give a new empty value ""





Could anyone provide me an example of Xpath syntax or help me to complete the step 5?


Many thanks