XmlSchemaSet Class
System.Xml
Represents a collection of schema objects that can be used to validate XML documents.
This class is thread-safe.
Class Members
-
Constructors
public XmlSchemaSet()Initializes a new instance of theXmlSchemaSetclass.public XmlSchemaSet(XmlSchemaSet schemaSet)Initializes a new instance of theXmlSchemaSetclass with the specified schema set. -
Properties
public override int Count { get; }Gets the number of schemas in the collection.public override bool IsReadOnly { get; }Gets a value indicating whether the collection is read-only.public override bool IsSynchronized { get; }Gets a value indicating whether access to the collection is synchronized (thread-safe).public override object SyncRoot { get; }Gets an object that can be used to synchronize access to the collection.public override XmlSchema this[int index] { get; }Gets theXmlSchemaat the specified index.public override XmlSchema this[string namespaceURI] { get; }Gets theXmlSchemawith the specified namespace URI. -
Methods
public override void Add(XmlSchema schema)Adds the specifiedXmlSchemato the collection.public void Add(string namespaceURI, string schemaLocation)Adds a schema to theXmlSchemaSetfrom the specified URI.public override void Clear()Removes all schemas from the collection.public override bool Contains(string namespaceURI)Determines whether a schema with the specified namespace URI is in the collection.public override IEnumerator GetEnumerator()Returns an enumerator that iterates through the collection.public override void Remove(XmlSchema schema)Removes the specifiedXmlSchemafrom the collection.public void Remove(string namespaceURI)Removes the schema associated with the specified namespace URI from theXmlSchemaSet.public void Reprocess(XmlSchema schema)Reprocesses the specifiedXmlSchema.public void Validate(ValidationEventHandler validationEventHandler)Validates all the schemas in theXmlSchemaSet. -
Events
public event ValidationEventHandler ValidationEventHandlerRaised when a validation error occurs during schema compilation or validation.
Inheritance
Base Classes
Directly Known Subclasses
XmlSchemaSet