lundi 9 décembre 2019

How to duplicate a node and its children in Karate

Hi I was trying to replace a node in the second level of the structure, eg the "two" node below (I want to duplicate this node and its children)

<root>
   <first>1</first>
   <second>
      <one>1</one>
      <two>
         <a>a</a>
         <b>b</b>
         <c>c</c>
      </two>
      <three>c</three>
   </second>
   <third>3</third>
</root>

So that it ends up looking like this:

<root>
   <first>1</first>
   <second>
      <one>1</one>
      <two>
         <a>a</a>
         <b>b</b>
         <c>c</c>
      </two>
      <two>
         <a>a</a>
         <b>b</b>
         <c>c</c>
      </two>
      <three>c</three>
   </second>
   <third>3</third>
</root>

Is this possible to do in Karate?

Many thanks

Aucun commentaire:

Enregistrer un commentaire