Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Extensions::Validate Method

 

Validates that an XDocument, an XElement, or an XAttribute conforms to an XSD in an XmlSchemaSet.

Namespace:   System.Xml.Schema
Assembly:  System.Xml.Linq (in System.Xml.Linq.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticValidate(XAttribute^, XmlSchemaObject^, XmlSchemaSet^, ValidationEventHandler^)

This method validates that an XAttribute conforms to a specified XmlSchemaObject and an XmlSchemaSet.

System_CAPS_pubmethodSystem_CAPS_staticValidate(XAttribute^, XmlSchemaObject^, XmlSchemaSet^, ValidationEventHandler^, Boolean)

Validates that an XAttribute conforms to a specified XmlSchemaObject and an XmlSchemaSet, optionally populating the XML tree with the post-schema-validation infoset (PSVI).

System_CAPS_pubmethodSystem_CAPS_staticValidate(XDocument^, XmlSchemaSet^, ValidationEventHandler^)

This method validates that an XDocument conforms to an XSD in an XmlSchemaSet.

System_CAPS_pubmethodSystem_CAPS_staticValidate(XDocument^, XmlSchemaSet^, ValidationEventHandler^, Boolean)

Validates that an XDocument conforms to an XSD in an XmlSchemaSet, optionally populating the XML tree with the post-schema-validation infoset (PSVI).

System_CAPS_pubmethodSystem_CAPS_staticValidate(XElement^, XmlSchemaObject^, XmlSchemaSet^, ValidationEventHandler^)

This method validates that an XElement sub-tree conforms to a specified XmlSchemaObject and an XmlSchemaSet.

System_CAPS_pubmethodSystem_CAPS_staticValidate(XElement^, XmlSchemaObject^, XmlSchemaSet^, ValidationEventHandler^, Boolean)

Validates that an XElement sub-tree conforms to a specified XmlSchemaObject and an XmlSchemaSet, optionally populating the XML tree with the post-schema-validation infoset (PSVI).

These methods use an underlying XmlReader to validate the XML tree against an XSD.

Validation error and warning messages are handled using the ValidationEventHandler delegate. If no event handler is provided to these methods, validation errors are exposed as an XmlSchemaValidationException. Validation warnings do not cause an XmlSchemaValidationException to be thrown.

Some of these extension methods optionally allow population of the post-schema-validation infoset (PSVI).

Return to top
Show:
© 2017 Microsoft