XML Script logo
Function replace
Name

replace

Returns

string

Parameter count

4

Parameter 1

first, a pointer(s)

Parameter 2

last, a pointer(s)

Parameter 3

inclusive, a string

Parameter 4

content, a string

Description

This function replaces a region of XML with evaluated content. See the documentation for the region function for details on how to select a region. No value is returned from this function.
For example
# replace(top\foo[1], top\foo[3], 1, "replacement" ) # returns replacement <foo value="4" /> <foo value="5" />
# replace(top\foo[1], top\foo[5], 0, top ) # <foo value="1" /> <foo value="1" /> <foo value="2" /> <foo value="3" />
<foo value="4" /> <foo value="5" /> <foo value="5" />

Examples of use

                                
                        

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited