IVBMXNamespaceManager

 

Provides a convenient way to manage namespaces, namespace prefixes, and namespace URIs for an XML document. With IVBMXNamespaceManager, namespace contexts are organized as a stack of namespace declarations. Each push operation pushes a namespace declaration or set of namespace declarations onto the stack. Each pop operation discards everything from the top of the stack. Namespace declarations on the stack have both current and local context.

Current context
Set of all namespace declarations on the stack.

oNSMgr.declarePrefix("a", "urn:same uri");  
oNSMgr.pushContext();  
oNSMgr.declarePrefix("b", "urn:new uri");  

The current context holds the prefixes "a" and "b".

Local context
Set of all namespace declarations from the top of the stack to the last pushContext method.

oNSMgr.declarePrefix("a", "urn:same uri");

oNSMgr.pushContext();

oNSMgr.declarePrefix("b", "urn:new uri");

The local context holds the prefix "b".

Remarks

IMXNamespaceManager provides duplicate methods for C++ processing, when necessary, to avoid the use of BSTR objects for C++.

IVBMXNamespaceManager performs a search from the top of stack through all namespace declarations, until a declaration is found or until the bottom of the stack is reached.

All indexes are continuous and start from 0.

IMXNamespaceManager checks [in] arguments for prefixes to ensure a valid prefix name according to the W3C Namespaces in XML Recommendation. IMXNamespaceManager does not check URI arguments.

Requirements

Implementation:

msxml6.dll, msxml6.lib (MSXML 6.0)

Header and IDL files (C/C++): msxml6.h, msxml6.idl

For version-specific GUID and ProgID information, see GUIDs and ProgID Information.

Versioning

Implemented in: MSXML 6.0

See Also

IVBMXNamespaceManager Members
IMXNamespaceManager Members
IMXNamespacePrefixes