2 Replies Latest reply on May 31, 2011 11:09 AM by teknix1

    Add second element into an xml object

    teknix1

      Hi,

       

      I can do a set value into an xml object to create a new element with a value. This is simple, I can do it this way:

      /process_data/myxmlvar/myvar     =    '123'

       

      This will give me an xml which looks something like this:

      <myxmlvar>

           <myvar>123</myvar>

      </myxmlvar>

       

      Now I want to add a second "myvar" element, basically turning it into an array. But I can't find a way to do this in a set value. I know it's possible to do this using an XSLT Transformation, but I'd much rather just do it inside a set value if that's possible.

       

      Just to clear any possible doubt, here's what I'm trying to get the output to look like:

      <myxmlvar>

           <myvar>123</myvar>

           <myvar>456</myvar>

      </myxmlvar>

       

      Thanks

      Nic