/* get namespace list */ NamespaceList Repository::getNamespaces () const { NamespaceList list; NamespaceMap::const_iterator iter; /* add all namespace names */ for (iter = mNamespaces.begin(); iter != mNamespaces.end(); ++iter) { if (iter->first != "") list.push_back (iter->second); } return list; }
NamespaceList Node::NamespacesInScope() const { NamespaceList result; xmlNsPtr *pNamespaces = xmlGetNsList(_xml->doc, _xml); if ( pNamespaces == nullptr ) return result; for ( int i = 0; pNamespaces[i] != nullptr; i++ ) { xmlNsPtr xmlNs = pNamespaces[i]; result.push_back(Wrapped<class Namespace, _xmlNs>(xmlNs)); } xmlMemFree(pNamespaces); return result; }