System::Xml::XmlNamespaceManager class

XmlNamespaceManager class

Resolves, adds, and removes namespaces to a collection and provides scope management for these namespaces.

class XmlNamespaceManager : public System::Xml::IXmlNamespaceResolver,
                            public System::Collections::Generic::IEnumerable<String>

Methods

MethodDescription
virtual AddNamespace(String, String)Adds the given namespace to the collection.
virtual get_DefaultNamespace()Returns the namespace URI for the default namespace.
virtual get_NameTable()Returns the XmlNameTable associated with this object.
GetEnumerator() overrideReturns an enumerator to use to iterate through the namespaces in the XmlNamespaceManager.
GetNamespacesInScope(XmlNamespaceScope) overrideReturns a collection of namespace names keyed by prefix which can be used to enumerate the namespaces currently in scope.
virtual HasNamespace(String)Returns a value indicating whether the supplied prefix has a namespace defined for the current pushed scope.
LookupNamespace(const String&) overrideReturns the namespace URI for the specified prefix.
LookupPrefix(const String&) overrideFinds the prefix declared for the given namespace URI.
virtual PopScope()Pops a namespace scope off the stack.
virtual PushScope()Pushes a namespace scope onto the stack.
virtual RemoveNamespace(String, String)Removes the given namespace for the given prefix.
XmlNamespaceManager(const SharedPtr<XmlNameTable>&)Initializes a new instance of the XmlNamespaceManager class with the specified XmlNameTable.

Typedefs

TypedefDescription
PtrAn alias for shared pointer to an instance of this class.

Remarks

Objects of this class should only be allocated using System::MakeObject() function. Never create instances of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

See Also