ValidateText()

XmlSchemaValidator::ValidateText(const String&) method

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

void System::Xml::Schema::XmlSchemaValidator::ValidateText(const String &elementValue)

Arguments

ParameterTypeDescription
elementValueconst String&A text string to validate in the current element context.

Exceptions

ExceptionDescription
XmlSchemaValidationExceptionThe text string specified is not allowed in the current element context.
InvalidOperationExceptionThe XmlSchemaValidator::ValidateText method was not called in the correct sequence. For example, the XmlSchemaValidator::ValidateText method is called after calling XmlSchemaValidator::ValidateAttribute.
ArgumentNullExceptionThe text string parameter cannot be nullptr.

XmlSchemaValidator::ValidateText(XmlValueGetter) method

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

void System::Xml::Schema::XmlSchemaValidator::ValidateText(XmlValueGetter elementValue)

Arguments

ParameterTypeDescription
elementValueXmlValueGetterAn XmlValueGetter callback used to pass the text value as a type compatible with the XML Schema Definition Language (XSD) type of the attribute.

Exceptions

ExceptionDescription
XmlSchemaValidationExceptionThe text string specified is not allowed in the current element context.
InvalidOperationExceptionThe XmlSchemaValidator::ValidateText method was not called in the correct sequence. For example, the XmlSchemaValidator::ValidateText method is called after calling XmlSchemaValidator::ValidateAttribute.
ArgumentNullExceptionThe text string parameter cannot be nullptr.

See Also