encodeXML method: Utility class
Syntax
encodeXML(String)
Description
Use this method to encode the following special characters in the source string as encoded XML characters:
| Character | Encoded Character |
|---|---|
|
< (less than) |
< |
|
> (greater than) |
> |
|
& (ampersand) |
& |
|
' (apostrophe) |
' |
|
" (quotation mark) |
" |
Parameters
| Parameter | Description |
|---|---|
|
String |
Specifies the source string with special characters to be encoded. |
Returns
A string containing the source string with the special characters encoded.
Example
If (&pValues [&i] <> Null) And
(&pChildTags <> Null) Then
/* get the children */
For &j = 1 To &pValues [&i].Len
If &j > &pChildTags.Len Then
Break;
End-If;
&thisElement = &thisElement | %This.setNodeValue(%This.encodeXML⇒
(&pValues [&i][&j]), &pChildTags [&j]);
End-For;
End-If;
Related Topics