XmlSchemaSet.Contains 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示 XML 結構定義語言(XSD)架構是否屬於 XmlSchemaSet。
多載
| 名稱 | Description |
|---|---|
| Contains(String) |
表示具有指定目標命名空間 URI 的 XML Schema 定義語言(XSD)架構是否屬於 XmlSchemaSet。 |
| Contains(XmlSchema) |
指示指定的 XML 結構定義語言(XSD) XmlSchema 物件是否屬於 XmlSchemaSet. |
Contains(String)
表示具有指定目標命名空間 URI 的 XML Schema 定義語言(XSD)架構是否屬於 XmlSchemaSet。
public:
bool Contains(System::String ^ targetNamespace);
public bool Contains(string? targetNamespace);
public bool Contains(string targetNamespace);
member this.Contains : string -> bool
Public Function Contains (targetNamespace As String) As Boolean
參數
- targetNamespace
- String
模式 targetNamespace 特性。
傳回
true 若結構包含指定目標命名空間 URI XmlSchemaSet,則 ;否則, false。
備註
間接加入的 XmlSchemaSet 結構會被 Contains 方法偵測;例如,匯入的結構。 因此,若將匯入該命名空間結構的結構http://www.contoso.com/retail加入 http://www.contoso.com/books,並以參數呼叫XmlSchemaSet,Contains則回傳 http://www.contoso.com/books。true
適用於
Contains(XmlSchema)
指示指定的 XML 結構定義語言(XSD) XmlSchema 物件是否屬於 XmlSchemaSet.
public:
bool Contains(System::Xml::Schema::XmlSchema ^ schema);
public bool Contains(System.Xml.Schema.XmlSchema schema);
member this.Contains : System.Xml.Schema.XmlSchema -> bool
Public Function Contains (schema As XmlSchema) As Boolean
參數
傳回
true 若 XmlSchema 物件屬於; XmlSchemaSet否則, false。
例外狀況
作為參數傳遞 XmlSchemaSet 的參數為 null。