Sdílet prostřednictvím


getDeclaredPrefixes Method

 

Returns a collection of declared namespace prefixes bound to a namespace name.

JScript Syntax

var objNSPrefixes = objNSManager.getDeclaredPrefixes();  

Parameters

None.

Return Values

An object. Returns the collection of prefixes.

Example

See the declarePrefix example for an example of this method.

C/C++ Syntax

HRESULT getDeclaredPrefixes(  
    IMXNamespacePrefixes** prefixes);  

Parameters

prefixes[out,retval]
The prefixes collection.

Return Values

S_OK
The value returned if successful.

E_POINTER
The value returned if the last parameter is NULL.

E_OUTOFMEMORY
The value returned if there is no memory for IMXNamespacePrefixes.

Remarks

The returned collection is never empty. If no prefixes have been declared, the returned collection contains the prefix 'xml' (permanently bound to 'http://www.w3.org/XML/1998/namespace'). If the URI reference in a default namespace declaration is empty, unprefixed elements in the scope of the declaration are not considered to be in any namespace. This causes the prefix xmlns to be used only for namespace bindings. This prefix is not itself bound to any namespace name.

Versioning

Implemented in: MSXML 6.0

Applies to

IVBMXNamespaceManager

See Also

getPrefixes Method
getDeclaredPrefix Method (C++)