XmlSchemaSet.XmlResolver 屬性

定義

設定 XmlResolver,用於解析在結構描述之 Include 和 Import 項目中參考的命名空間或位置。Sets the XmlResolver used to resolve namespaces or locations referenced in include and import elements of a schema.

public:
 property System::Xml::XmlResolver ^ XmlResolver {  void set(System::Xml::XmlResolver ^ value); };
public System.Xml.XmlResolver XmlResolver { set; }
member this.XmlResolver : System.Xml.XmlResolver
Public Property XmlResolver As XmlResolver

屬性值

XmlResolver,用於解析在結構描述之 Include 和 Import 項目中參考的命名空間或位置。The XmlResolver used to resolve namespaces or locations referenced in include and import elements of a schema.

備註

XmlSchemaSetXmlResolver 用來解析架構的 include 和 import 元素中參考的命名空間或位置,不論何時使用 AddReprocess 方法加入架構都是如此。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.

重要

架構之 include、import 和 redefine 元素中所參考的外部命名空間或位置,會與包含或匯入它們之架構的基底 URI 相關解析。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. 例如,如果包含或匯入架構的基底 URI 是空的或 null,則會根據目前目錄來解析外部位置。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. 預設會使用 XmlUrlResolver 類別來解析外部架構。The XmlUrlResolver class is used to resolve external schemas by default. 若要停用架構之 include、import 和 redefine 元素的解析,請將 XmlResolver 屬性設為 nullTo disable resolution of include, import, and redefine elements of a schema, set the XmlResolver property to null.

適用於

另請參閱