Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
XmlSchemaValidator.AddSchema(XmlSchema) Method
Definition
- Namespace:
- System.Xml.Schema
- Assemblies:
- netstandard.dll, System.Xml.ReaderWriter.dll
- Assembly:
- System.Xml.ReaderWriter.dll
- Assembly:
- System.Xml.dll
- Assembly:
- netstandard.dll
- Source:
- XmlSchemaValidator.cs
- Source:
- XmlSchemaValidator.cs
- Source:
- XmlSchemaValidator.cs
- Source:
- XmlSchemaValidator.cs
- Source:
- XmlSchemaValidator.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an XML Schema Definition Language (XSD) schema to the set of schemas used for validation.
public:
void AddSchema(System::Xml::Schema::XmlSchema ^ schema);
public void AddSchema(System.Xml.Schema.XmlSchema schema);
member this.AddSchema : System.Xml.Schema.XmlSchema -> unit
Public Sub AddSchema (schema As XmlSchema)
Parameters
Exceptions
The XmlSchema parameter specified is null.
The target namespace of the XmlSchema parameter matches that of any element or attribute already encountered by the XmlSchemaValidator object.
The XmlSchema parameter is invalid.
Remarks
The following are important notes to consider when using the AddSchema method.
The AddSchema method can be used to simulate the effect of encountering an inline XML schema in the XML document being validated.
The target namespace of the XmlSchema parameter cannot match that of any element or attribute already encountered by the XmlSchemaValidator object.
If the ProcessInlineSchema validation option is not set, the AddSchema method does nothing.
Applies to
See also
Feedback
Was this page helpful?
