Altova XMLSpy 2022 Professional Edition

Description and syntax

Replaces a node with a sequence of any kind of items.


replace node targetNode with items




The expression targetNode must point to a single target node.

The expression items must return a sequence of items. This sequence will replace the target node.

Except for attribute nodes, a target node can be replaced by any type of sequence.

An attribute node can only be replaced with an attribute node. See example below.




replace node //hr with '<line/>'


for \$i in //@height return

replace node \$i with (attribute line-height{'12pt'})


© 2016-2022 Altova GmbH