Share via


schemaLocations Property

 

[This feature was only implemented for MSXML 6.0.]

Returns a string collection. This collection contains all of the URIs that are imported to or included in the XML Schema object being used. Each URI in the XML Schema is represented by a string item in the collection. The URI text is retrieved by using the item property of the ISchemaStringCollection.

The schemaLocations property returns just the schemaLocations for a single target namespace. If you want to see all of the schemaLocations for all namespaces, including imported namespaces, you must query each target namespace separately.

Example

The following VBScript example shows how to lists the URIs of the imported or included XML Schemas.

Set oSchemaCache = CreateObject("Msxml2.XMLSchemaCache.6.0")
oSchemaCache.add "", "po.xsd"
Set oSchema = oSchemaCache.getSchema("")

For Each oURI in oSchema.schemaLocations
   WScript.Echo oURI
Next

JScript Syntax

var oSchemaLocations = oISchema.schemaLocations;  

Parameters

Return Values

OSchemaLocations
An object. The collection of XML Schema URIs imported to or included in this XML Schema. This collection contains strings that contain the schema URIs.

Visual Basic Syntax

Set oSchemaLocations = oISchema.schemaLocations  

Parameters

None.

Return Values

oSchemaLocations
An object. The collection of XML Schema URIs imported to or included in this XML Schema. This collection contains strings that contain the schema URIs.

C/C++ Syntax

HRESULT get_schemaLocations (ISchemaStringCollection** schemaLocations);  

Parameters

schemaLocations[out,retval]
An object. The collection of schema URIs.

Return Values

S_OK
The value returned if successful.

E_Pointer
The value returned if the schemaLocations collection is NULL.

E_FAIL
The value returned if something else is wrong.

Versioning

Implemented in: MSXML 6.0

Applies to

ISchema Interface

See Also

ISchemaStringCollection Interface
Using Other Namespaces