Converts a string to it representation as XML character data.
Source position: laz2_dom.pas line 851
function StrToXMLValue( |
const s: string |
):string; |
s |
|
Values to convert to XML character data. |
XML character data for the specified value.
StrToXMLValue is a String function used to convert the value in s to its representation as valid XML character data. The XML specification has five "predefined entities" that represent special characters. StrToXMLValue ensures that any of these characters in s are converted to their representation as a Character Entity, including:
| Character | Entity Name | Unicode Codepoint | Description |
| " | " | U+0022 (Decimal 34) | Double quotation Mark |
| & | & | U+0026 (Decimal 38) | Ampersand |
| ' | ' | U+0027 (Decimal 39) | Apostrophe (Apostrophe-Quote) |
| < | < | U+003C (Decimal 60) | Less-than |
| > | > | U+003E (Decimal 62) | Greater-than |
StrToXMLValue also ensures that any NULL character values (Decimal 0) in s are removed.
No actions are performed in the method when s is an empty string ('').
Use XMLValueToStr to convert XML character data to its representation as a String data type.
|
Converts XML character data to its representation as a string value. |
| Version 4.4 | Generated 2025-11-08 | Home |