XmlSchemaSet.XmlResolver Property

Definition

Sets the XmlResolver used to resolve namespaces or locations referenced in include and import elements of a schema.

C#
public System.Xml.XmlResolver? XmlResolver { set; }
C#
public System.Xml.XmlResolver XmlResolver { set; }

Property Value

The XmlResolver used to resolve namespaces or locations referenced in include and import elements of a schema.

Remarks

The XmlResolver of an XmlSchemaSet is used to resolve namespaces or locations referenced in include and import elements of a schema, any time a schema is added using the Add or Reprocess methods.

Important

External namespaces or locations referenced in include, import, and redefine elements of a schema are resolved with respect to the base URI of the schema that includes or imports them. For example, if the base URI of the including or importing schema is empty or null, the external locations are resolved with respect to the current directory. The XmlUrlResolver class is used to resolve external schemas by default. To disable resolution of include, import, and redefine elements of a schema, set the XmlResolver property to null.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

See also