XmlSchemaExternal.SchemaLocation 屬性
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定結構描述的統一資源識別元 (URI) 位置,告知結構描述處理器,結構描述實際存放的位置。
public:
property System::String ^ SchemaLocation { System::String ^ get(); void set(System::String ^ value); };
C#
public string? SchemaLocation { get; set; }
C#
public string SchemaLocation { get; set; }
member this.SchemaLocation : string with get, set
Public Property SchemaLocation As String
結構描述的 URI 位置。 對於匯入結構描述而言是選擇性的。
沒有這個屬性的匯入架構可讓匯入的架構命名空間由 XML 檔決定,該檔是包含架構的實例,或是正在處理架構的應用程式。
包含的架構會使用這個屬性做為架構檔位置的 URI 參考,該檔應該包含在包含架構的目標命名空間中。
產品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 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 |