Okapi .NET Library

Routines.EscapeToXML Method 

 [This is preliminary documentation and subject to change.]

Escapes a string for XML/HTML output.

[Visual Basic]
Shared Public Function EscapeToXML( _ 
   ByVal p_sText As String, _ 
   ByVal p_nEscapeQuotes As Integer, _ 
   ByVal p_bAlwaysEscapeGT As Boolean _ 
) As String
[C#]
public static string EscapeToXML(
   string p_sText,
   int p_nEscapeQuotes,
   bool p_bAlwaysEscapeGT
);
[C++]
public: static String* EscapeToXML(
   String* p_sText,
   int p_nEscapeQuotes,
   bool p_bAlwaysEscapeGT
);
[JScript]
public static function EscapeToXML(
   String p_sText,
   int p_nEscapeQuotes,
   bool p_bAlwaysEscapeGT
): String;

Parameters

p_sText
Text to escape.
p_nEscapeQuotes
Type of escape for the quotes: 0=no escape, 1=apos+quot, 2=#39+quot, 3=quot only.
p_bAlwaysEscapeGT
True if '>' should be escaped as >.

Return Value

the escaped string.

See Also

Routines Class | Okapi.Library.Base Namespace