Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adding new node to XML variable - How to?

Avatar

Level 10

I have an xml variable (named myXML) with the following node:

<MyInfo>

</MyInfo>

I need to add two <Dept> nodes to the above XML using SetValue.

I tried to assing these two nodes, but only one node is added.

/process-data/myXML/MyInfo/Dept   = "Department1"

/process-data/myXML/MyInfo/Dept   = "Department2"

The above statement overwrite the first statement.

What can I do to get the following result??

<MyInfo>

     <Dept>Department 1</Dept>

     <Dept>Department 2</Dept>

</MyInfo>

Thanks for any advise..

Nith

0 Replies