getSchema Method
Returns an ISchema
object. The schema contains the namespace URI specified in the namespaceURI
parameter that is passed to this method. The ISchema
interface can be used to further obtain information about the schema object that is returned.
The following example shows the getSchema
method being used to return a schema object.
Dim oSchemaCache as New IXMLDOMSchemaCollection2 Dim oSchema as ISchema Dim nsTarget as String nsTarget = "http://www.example.microsoft.com" oSchemaCache.add nsTarget, PO.xsd Set oSchema = oSchemaCache.getSchema(nsTarget)
[Script]
Implementation Syntax
var oSchema = oSchemaCache.getSchema(strNamespaceURI);
Parameters
- strNamespaceURI
- A string. The namespace of the schema to be retrieved from the schema cache.
Return Values
- oSchema
- An object. The schema object for the Namespace URI sent to the
getSchema
method.
[Visual Basic]
Implementation Syntax
Set oSchema = oSchemaCache.getSchema(strNamespaceURI)
Parameters
- strNamespaceURI
- A string. The namespace of the schema to be retrieved from the schema cache.
Return Values
- oSchema
- An object. The schema object for the specified schema.
[C/C++]
Syntax
HRESULT getSchema(BSTR namespaceURI, ISchema** schema);
Parameters
- strNamespaceURI [in]
- A string. The namespace of the schema to be retrieved from the schema cache.
- oSchema [out,retval]
- An object. The schema object for the specified schema.
Return Values
- S_OK
- The value returned if successful.
- E_POINTER
- The value returned if the schema is NULL
- E_FAIL
- The value returned if another problem is detected.
To view reference information for Visual Basic or C/C++ only, click the Language Filter button in the upper-left corner of the page.
See Also
ISchema interface | Using Namespaces in Schemas
Applies to: IXMLDOMSchemaCollection2