Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SOM Reference

targetNamespace Property

Returns a string that indicates the value of the targetNamespace attribute of the XML Schema. The targetNamespace is an attribute of the <schema> declaration.

Example

The following is an example of the targetNamespace attribute in an XML Schema.

<schema targetNamespace="http://www.samplenamespace.microsoft.com">
   <element>
   </element>
</schema>
[Script]

Implementation Syntax

var strTargetNamespace = oISchema.targetNamespace;

Parameters

None.

Return Values

strTargetNamespace
A string. The value of the targetNamespace attribute of the XML Schema.
[Visual Basic]

Implementation Syntax

var strTargetNamespace = oISchema.targetNamespace

Parameters

None.

Return Values

strTargetNamespace
A string. The value of the targetNamespace attribute of the XML Schema.
[C/C++]

Implementation Syntax

HRESULT get_targetNamespace(BSTR* targetNamespace);

Parameters

targetNamespace [out,retval]
A string. The value of the targetNamespace attribute of the XML Schema.

Return Values

S_OK
The value returned if successful.
E_Pointer
The value returned if the targetNamespace is NULL.
E_FAIL
The value returned if something else is wrong.

To view reference information for Visual Basic or C/C++ only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

Using Namespaces in Schemas | Using Other Namespaces

Applies to: ISchema Interface