ValidateEndElement()

XmlSchemaValidator::ValidateEndElement(const SharedPtr<XmlSchemaInfo>&) method

Verifies if the text content of the element is valid according to its data type for elements with simple content, and verifies if the content of the current element is complete for elements with complex content.

SharedPtr<Object> System::Xml::Schema::XmlSchemaValidator::ValidateEndElement(const SharedPtr<XmlSchemaInfo> &schemaInfo)

Arguments

ParameterTypeDescription
schemaInfoconst SharedPtr<XmlSchemaInfo>&An XmlSchemaInfo object whose properties are set on successful validation of the element. This parameter can be nullptr.

Return Value

The parsed, typed text value of the element if the element has simple content.

Exceptions

ExceptionDescription
XmlSchemaValidationExceptionThe element’s content is not valid.
InvalidOperationExceptionThe XmlSchemaValidator::ValidateEndElement method was not called in the correct sequence. For example, if the XmlSchemaValidator::ValidateEndElement method is called after calling XmlSchemaValidator::SkipToEndElement.

XmlSchemaValidator::ValidateEndElement(const SharedPtr<XmlSchemaInfo>&, const SharedPtr<Object>&) method

Verifies if the text content of the element specified is valid according to its data type.

SharedPtr<Object> System::Xml::Schema::XmlSchemaValidator::ValidateEndElement(const SharedPtr<XmlSchemaInfo> &schemaInfo, const SharedPtr<Object> &typedValue)

Arguments

ParameterTypeDescription
schemaInfoconst SharedPtr<XmlSchemaInfo>&An XmlSchemaInfo object whose properties are set on successful validation of the text content of the element. This parameter can be nullptr.
typedValueconst SharedPtr<Object>&The typed text content of the element.

Return Value

The parsed, typed simple content of the element.

Exceptions

ExceptionDescription
XmlSchemaValidationExceptionThe element’s text content is not valid.
InvalidOperationExceptionThe XmlSchemaValidator::ValidateEndElement method was not called in the correct sequence (for example, if the XmlSchemaValidator::ValidateEndElement method is called after calling XmlSchemaValidator::SkipToEndElement), calls to the XmlSchemaValidator::ValidateText method have been previously made, or the element has complex content.
ArgumentNullExceptionThe typed text content parameter cannot be nullptr.

See Also