System.Xml.XmlConvert.VerifyXmlChars Method

Returns the passed-in string if all the characters and surrogate pair characters in the string argument are valid XML characters, otherwise null.

Syntax

public static string VerifyXmlChars (string content)

Parameters

content
string that contains characters to verify.

Returns

Returns the passed-in string if all the characters and surrogate-pair characters in the string argument are valid XML characters, otherwise null.

Remarks

No other values than the passed in argument should be returned. See tp://go.microsoft.com/fwlink/?LinkID=147985 production [2] Char for details on the allowed characters.

If the parameter is null, an ArgumentNullException will be thrown. If any of the characters are not valid xml characters, an XmlException is thrown with information on the first invalid character encountered.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 4.0.0.0