XmlSchemaValidator.ValidateWhitespace Method

Definition

Validates whether white space is allowed in the current element context, and accumulates the white space for validation if the current element has simple content.

Overloads

ValidateWhitespace(String)

Validates whether the white space in the string specified is allowed in the current element context, and accumulates the white space for validation if the current element has simple content.

ValidateWhitespace(XmlValueGetter)

Validates whether the white space returned by the XmlValueGetter object specified is allowed in the current element context, and accumulates the white space for validation if the current element has simple content.

ValidateWhitespace(String)

Validates whether the white space in the string specified is allowed in the current element context, and accumulates the white space for validation if the current element has simple content.

public void ValidateWhitespace (string elementValue);
Parameters
elementValue
String

A white space string to validate in the current element context.

Exceptions

White space is not allowed in the current element context.

The ValidateWhitespace method was not called in the correct sequence. For example, if the ValidateWhitespace method is called after calling ValidateAttribute.

ValidateWhitespace(XmlValueGetter)

Validates whether the white space returned by the XmlValueGetter object specified is allowed in the current element context, and accumulates the white space for validation if the current element has simple content.

public void ValidateWhitespace (System.Xml.Schema.XmlValueGetter elementValue);
Parameters
elementValue
XmlValueGetter

An XmlValueGetterdelegate used to pass the white space value as a Common Language Runtime (CLR) type compatible with the XML Schema Definition Language (XSD) type of the attribute.

Exceptions

White space is not allowed in the current element context.

The ValidateWhitespace method was not called in the correct sequence. For example, if the ValidateWhitespace method is called after calling ValidateAttribute.

See Also

Applies to