declare namespace= " ";
Yes, you can do that with an XQuery expression (XMLXQueryUpdater).I think the following example contains every syntax you have to learn for the present.
Source XML
X1
aaa X2
aaa X2
bbb Z3
aaa
XQuery Expression (assume that an attribute storing the source XML is set to the XML Attribute parameter in the XMLXQueryUpdater)
for $item in //item let $code := data($item/code) let $desc := data($item/desc) return if (matches($code, '^X.*')) then ( replace value of node $item/code with 'KK', if ($code = 'X1' and $desc = 'aaa') then replace value of node $item/desc with 'foo aaa' else if ($code ='X2' and $desc = 'aaa') then replace value of node $item/desc with 'bar aaa' else () ) else ()
Result
KK
foo aaa KK
bar aaa KK
bbb Z3
aaa
If you need more specific solution, please post a small (but valid) sample XML and your desired result corresponding to the sample.