Altova XMLSpy 2024 Enterprise Edition

Description and syntax

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

 

replace node targetNode with items

 

Details

 

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.

 

Examples

 

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

 

for \$i in //@height return

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

 

© 2017-2023 Altova GmbH