Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Returns the namespace at the specified index.

Script Syntax

Copy Code
		
strNamespaceURI = objXMLDOMSchemaCollection.namespaceURI(
index);

Remarks

Script Parameters

index

The index between 0 and (count-1).

Script Return Values

String. Returns the namespace URI at the given index. This string is a normalized version of the one provided in the add Method(that is, leading and trailing white space is trimmed, new lines are converted to spaces, and multiple adjacent white space characters are collapsed into one space).

C/C++ Syntax

Copy Code
HRESULT get_namespaceURI(
  long 
index,
  BSTR* 
length
);

Remarks

C/C++ Parameters

index

[in] The index between 0 and count -1.

length

[out, retval] The namespace URI at the given index. This string is a normalized version of the one provided in the add Method(that is, leading and trailing white space is trimmed, new lines are converted to spaces, and multiple adjacent white space characters are collapsed into one space).

C/C++ Return Values

E_INVALIDARG

Value returned if the index is out of range.

Requirements

Header msxml2.h, msxml2.idl
Windows Embedded CE Windows CE .NET 4.0 and later

General Remarks

The namespaceURIproperty allows you to iterate through the collection to discover its contents. You can then use the getmethod (namespace) to see if there is an associated schema.

This is the default collection property, so you can do the following.

Copy Code
var uri = xmldoc.namespaces(1)

This property is read-only, and applies to the following objects and interfaces:

XMLSchemaCache/IXMLDOMSchemaCollection

See Also

Concepts

get Method

Other Resources