## XmlSchemaCollection::Contains(const SharedPtr\<XmlSchema\>\&) method


Returns a value indicating whether the **targetNamespace** of the specified [XmlSchema](../../xmlschema/) is in the collection.

```cpp
bool System::Xml::Schema::XmlSchemaCollection::Contains(const SharedPtr<XmlSchema> &schema)
```


| Parameter | Type | Description |
| --- | --- | --- |
| schema | const SharedPtr\<XmlSchema\>\& | The [XmlSchema](../../xmlschema/) object. |

### ReturnValue

**true** if there is a schema in the collection with the same **targetNamespace**; otherwise, **false**.

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [XmlSchema](../../xmlschema/)
* Class [XmlSchemaCollection](../)
* Namespace [System::Xml::Schema](../../)
* Library [Aspose.PUB for C++](../../../)
## XmlSchemaCollection::Contains(const String\&) method


Returns a value indicating whether a schema with the specified namespace is in the collection.

```cpp
bool System::Xml::Schema::XmlSchemaCollection::Contains(const String &ns)
```


| Parameter | Type | Description |
| --- | --- | --- |
| ns | const String\& | The namespace URI associated with the schema. For XML Schemas, this will typically be the target namespace. |

### ReturnValue

**true** if a schema with the specified namespace is in the collection; otherwise, **false**.

## See Also

* Class [String](../../../system/string/)
* Class [XmlSchemaCollection](../)
* Namespace [System::Xml::Schema](../../)
* Library [Aspose.PUB for C++](../../../)
