AddSchema()

XmlSchemaValidator::AddSchema(const SharedPtr<XmlSchema>&) method

Adds an XML Schema Definition Language (XSD) schema to the set of schemas used for validation.

void System::Xml::Schema::XmlSchemaValidator::AddSchema(const SharedPtr<XmlSchema> &schema)

Arguments

ParameterTypeDescription
schemaconst SharedPtr<XmlSchema>&An XmlSchema object to add to the set of schemas used for validation.

Exceptions

ExceptionDescription
ArgumentNullExceptionThe XmlSchema parameter specified is nullptr.
XmlSchemaValidationExceptionThe target namespace of the XmlSchema parameter matches that of any element or attribute already encountered by the XmlSchemaValidator object.
XmlSchemaExceptionThe XmlSchema parameter is invalid.

See Also