Transform MaskXmlInvalidCharacters Method | Apache log4net™ SDK Documentation

Replace invalid XML characters in text string

Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public static string MaskXmlInvalidCharacters(
    	string textData,
    	string mask
    )

    Public Shared Function MaskXmlInvalidCharacters (
    	textData As String,
    	mask As String
    ) As String

    public:
    static String^ MaskXmlInvalidCharacters(
    	String^ textData,
    	String^ mask
    )

    static member MaskXmlInvalidCharacters :
            textData : string *
            mask : string -> string

#### Parameters

textData
  Type: System
  String
  the XML text input string
mask
  Type: System
  String
  the string to use in place of invalid characters

#### Return Value

Type: String
A string that does not contain invalid XML characters.
Remarks

Certain Unicode code points are not allowed in the XML InfoSet, for details see: http://www.w3.org/TR/REC-xml/#charsets.

This method replaces any illegal characters in the input string with the mask string specified.

See Also

#### Reference

Transform Class
log4net.Util Namespace