XmlSchemaValidator.AddSchema(XmlSchema) Method
Definition
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈