Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Workbench
Viewing all articles
Browse latest Browse all 69588

Execute Script - How to Update second node in XML group

$
0
0

Hi,

 

I have an XML variable "myXML" which is set to:

 

<root>

     <nodes>

          <node>

               <value>a</value>

          </node>

          <node>

               <value>b</value>

          </node>

     </nodes>

</root>

 

 

Question - within an Execute script, how can I easily access and update the second node value? i.e. change "b" to "c"

 

The following fails in Execute Script (although it is possible using an XPath expression in a SetValue

 

  patExecContext.setProcessDataValue("/process_data/myXML/root/nodes/node[1]/value", "c");

If I have square brackets in this expression then it fails with a nasty error

 

 

Is there an easy way?


Viewing all articles
Browse latest Browse all 69588

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>