Replace Inside Return Document

Subroutine Name Executable Example Viewable Example Resources

W3REPLACE

E3TEMPL

E3TEMPL

E3TEMPL.HTML

Description

Search the already written output page for a specific string and replace all occurrences with a new string. Use together with W3LOAD-RESOURCE for template processing.

With the encoding parameter, the given data will be encoded before the replacement is done:

  • " " for no encoding

  • "HTML" for HTML encoding (e.g. < becomes &lt;)

  • "URL" for URL encoding

  • "XML" for XML encoding (e.g. < becomes &lt;)

Parameters
1 W3ENCODING   (A) DYNAMIC BY VALUE    /* i /m : encoding
1 W3OLD        (A) DYNAMIC BY VALUE    /* i /m : old string
1 W3NEW        (A) DYNAMIC BY VALUE    /* i /m : new string
How To Invoke
PERFORM W3REPLACE "$weather$" "fine, no clouds"