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.
- schemaInfo
- An System.Xml.Schema.XmlSchemaInfo object whose properties are set on successful validation of the element. This parameter can be null.
The parsed, typed text value of the element if the element has simple content.
The following are important notes to consider when using the XmlSchemaValidator.ValidateEndElement(XmlSchemaInfo) method.
For elements with simple content, the XmlSchemaValidator.ValidateEndElement(XmlSchemaInfo) method verifies that the text content of the element is valid according to its data type and returns the parsed typed value. The text content of the element is obtained from the results of previous calls to erload:System.Xml.Schema.XmlSchemaValidator.ValidateText.
For elements with complex content, the XmlSchemaValidator.ValidateEndElement(XmlSchemaInfo) method verifies if the content of the current element is complete.
If the element has a default value, the value returned from the XmlSchemaValidator.ValidateEndElement(XmlSchemaInfo) method is the default value for the element.
If the System.Xml.Schema.XmlSchemaValidator object was constructed with the XmlSchemaValidationFlags.ProcessIdentityConstraints value as a parameter, the XmlSchemaValidator.ValidateEndElement(XmlSchemaInfo) method checks the identity constraint rules (if any) that apply to the element.
If the element is successfully validated in the current context, the System.Xml.Schema.XmlSchemaInfo object's (if specified) XmlSchemaInfo.IsDefault, XmlSchemaInfo.MemberType, and XmlSchemaInfo.Validity properties are set with the results of the validation.