Microsoft XML SDK 2.6 - XML Reference

IXMLDOMSchemaCollection::addCollection Method

Adds all the schemas from another collection into this collection, replacing any schemas that collide on the same namespace URI.

Visual Basic Syntax

objXMLDOMSchemaCol.addCollection(objXMLDOMSchemaCollection)

C/C++ Syntax

HRESULT addCollection(IXMLDOMSchemaCollection* pCollection);

Parameters

pCollection [in]
The collection containing the schemas to add.

C/C++ Return Values

S_OK
Value returned if the collection is added successfully.
E_FAIL
  • Value returned if:
    the collection is read-only.
    the document is not a recognized schema.
    an error occurs when compiling the schema.
    the ready state of the document is not 4.
E_POINTER
Value returned if input pointer is invalid.

Remarks

There is no guarantee that the two collections will return exactly the same schema objects—the collection is free to clone them if necessary.

Adding a collection to itself has no effect; S_OK is returned.

See Also

IXMLDOMSchemaCollection Interface