XML and namespaces

Paul Boddie paul at boddie.org.uk
Wed Dec 7 18:30:54 CET 2005

Paul Boddie wrote:
> It is difficult to say whether this usage of the API is correct or not, judging from the
> Web site's material


Some more on this: I found an example on the libxml2 mailing list
(searching for "xmlNewNs default namespace") which is similar to the
one I gave:


Meanwhile, the usage of xmlNewNs seems to have some correlation with
the production of xmlns attributes (found in a search for "xmlns
default namespace"):


And whilst gdome2 - the GNOME project's DOM wrapper for libxml2 - seems
to create unowned namespaces, adding them to the document as global
namespace declarations (looking at the code for gdome_xmlNewNs and
gdome_xml_doc_createElementNS respectively)...


...seemingly comparable operations with libxml2mod seem to be no longer

>>> libxml2mod.xmlNewGlobalNs(d, "DAV:", None)
xmlNewGlobalNs() deprecated function reached

Given that I've recently unsubscribed from some pretty unproductive
mailing lists, perhaps I should make some enquiries on the libxml2
mailing list and possibly report back.


More information about the Python-list mailing list