diff options
author | Mike Hommey <glandium@debian.org> | 2005-07-12 19:58:48 +0000 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2005-07-12 19:58:48 +0000 |
commit | 112cb5bb5475afec1c1cbf1d6728ce4880d0fee8 (patch) | |
tree | 6c34596134f8665ebc180f29b50915dc70bbe5c1 /python/libxml.py | |
parent | 0fc063df3ab2ad380d532d210dd1001de473e51b (diff) | |
download | libxml2-112cb5bb5475afec1c1cbf1d6728ce4880d0fee8.tar.gz |
Load /tmp/tmp.zfIyNk/libxml2-2.6.20 intoupstream/2.6.20
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'python/libxml.py')
-rw-r--r-- | python/libxml.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/python/libxml.py b/python/libxml.py index 2eca71e..86bdd92 100644 --- a/python/libxml.py +++ b/python/libxml.py @@ -429,6 +429,27 @@ class xmlCore: def xpathEval2(self, expr): return self.xpathEval(expr) + # Remove namespaces + def removeNsDef(self, href): + """ + Remove a namespace definition from a node. If href is None, + remove all of the ns definitions on that node. The removed + namespaces are returned as a linked list. + + Note: If any child nodes referred to the removed namespaces, + they will be left with dangling links. You should call + renciliateNs() to fix those pointers. + + Note: This method does not free memory taken by the ns + definitions. You will need to free it manually with the + freeNsList() method on the returns xmlNs object. + """ + + ret = libxml2mod.xmlNodeRemoveNsDef(self._o, href) + if ret is None:return None + __tmp = xmlNs(_obj=ret) + return __tmp + # support for python2 iterators def walk_depth_first(self): return xmlCoreDepthFirstItertor(self) |