Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xdt transformation of inner values

I am trying to transform the following with an XML transformation file (xdt):

<serviceProperty name="Group">
  <expression>33</expression>
</serviceProperty>

Im looking to replace 33 with another number. I have figured out how to replace one occurance with

<expression xdt:Locator="XPath(//serviceProperty[@name='Group']/expression[text()='33'])" xdt:Transform="Replace" >48</expression>

But how would I make this work for all matching elements?

like image 352
Jinxly Avatar asked Oct 22 '22 17:10

Jinxly


1 Answers

You could try doing this in your .config file:

<serviceProperty name="Group">
    <expression xdt:Transform="Replace">45</expression>
</serviceProperty>
like image 75
gilljoy Avatar answered Oct 28 '22 23:10

gilljoy