Module libxml2 :: Class xmlNs
[hide private]
[frames] | no frames]

Class xmlNs

source code

xmlCore --+    
          |    
    xmlNode --+
              |
             xmlNs

Instance Methods [hide private]
 
__init__(self, _obj=None) source code
 
__repr__(self) source code
 
copyNamespace(self)
Do a copy of the namespace.
source code
 
copyNamespaceList(self)
Do a copy of an namespace list.
source code
 
freeNs(self)
Free up the structures associated to a namespace
source code
 
freeNsList(self)
Free up all the structures associated to the chained namespaces.
source code
 
newChild(self, parent, name, content)
Creation of a new child element, added at the end of @parent children list.
source code
 
newDocNode(self, doc, name, content)
Creation of a new node element within a document.
source code
 
newDocNodeEatName(self, doc, name, content)
Creation of a new node element within a document.
source code
 
newDocRawNode(self, doc, name, content)
Creation of a new node element within a document.
source code
 
newNodeEatName(self, name)
Creation of a new node element.
source code
 
newNsProp(self, node, name, value)
Create a new property tagged with a namespace and carried by a node.
source code
 
newNsPropEatName(self, node, name, value)
Create a new property tagged with a namespace and carried by a node.
source code
 
newTextChild(self, parent, name, content)
Creation of a new child element, added at the end of @parent children list.
source code
 
setNs(self, node)
Associate a namespace to a node, a posteriori.
source code
 
setNsProp(self, node, name, value)
Set (or reset) an attribute carried by a node.
source code
 
unsetNsProp(self, node, name)
Remove an attribute carried by a node.
source code
 
xpathNodeSetFreeNs(self)
Namespace nodes in libxml don't match the XPath semantic.
source code

Inherited from xmlNode: addChild, addChildList, addContent, addContentLen, addNextSibling, addPrevSibling, addSibling, copyNode, copyNodeList, copyProp, copyPropList, debugDumpNode, debugDumpNodeList, debugDumpOneNode, docCopyNode, docCopyNodeList, docSetRootElement, freeNode, freeNodeList, getBase, getContent, getLang, getSpacePreserve, hasNsProp, hasProp, isBlankNode, isID, isRef, isText, lastChild, lineNo, listGetRawString, listGetString, lsCountNode, lsOneNode, newNs, newProp, noNsProp, nodePath, ns, nsDefs, nsProp, prop, reconciliateNs, replaceNode, schemaValidateOneElement, searchNs, searchNsByHref, setBase, setContent, setContentLen, setLang, setListDoc, setName, setProp, setSpacePreserve, setTreeDoc, shellPrintNode, textConcat, textMerge, unlinkNode, unsetProp, validNormalizeAttributeValue, xincludeProcessTree, xincludeProcessTreeFlags, xpathCastNodeToNumber, xpathCastNodeToString, xpathCmpNodes, xpathNewNodeSet, xpathNewValueTree, xpathNextAncestor, xpathNextAncestorOrSelf, xpathNextAttribute, xpathNextChild, xpathNextDescendant, xpathNextDescendantOrSelf, xpathNextFollowing, xpathNextFollowingSibling, xpathNextNamespace, xpathNextParent, xpathNextPreceding, xpathNextPrecedingSibling, xpathNextSelf, xpointerNewCollapsedRange, xpointerNewContext, xpointerNewLocationSetNodes, xpointerNewRange, xpointerNewRangeNodes

Inherited from xmlCore: __eq__, __getattr__, __hash__, __iter__, __ne__, __str__, c14nMemory, c14nSaveTo, free, get_children, get_content, get_doc, get_last, get_name, get_next, get_parent, get_prev, get_properties, get_type, removeNsDef, saveTo, serialize, walk_breadth_first, walk_depth_first, xpathEval, xpathEval2

Properties [hide private]

Inherited from xmlCore: children, content, doc, last, name, next, parent, prev, properties, type

Method Details [hide private]

__init__(self, _obj=None)
(Constructor)

source code 
Overrides: xmlNode.__init__

__repr__(self)
(Representation operator)

source code 
Overrides: xmlNode.__repr__

newChild(self, parent, name, content)

source code 
Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (None). If @ns is None, the newly created element inherits the namespace of @parent. If @content is non None, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references. XML special chars must be escaped first by using xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should be used.
Overrides: xmlNode.newChild

newDocNode(self, doc, name, content)

source code 
Creation of a new node element within a document. @ns and

newDocNodeEatName(self, doc, name, content)

source code 
Creation of a new node element within a document. @ns and

newDocRawNode(self, doc, name, content)

source code 
Creation of a new node element within a document. @ns and @content are optional (None).

newNodeEatName(self, name)

source code 
Creation of a new node element. @ns is optional (None).

newNsProp(self, node, name, value)

source code 
Create a new property tagged with a namespace and carried by a node.
Overrides: xmlNode.newNsProp

newNsPropEatName(self, node, name, value)

source code 
Create a new property tagged with a namespace and carried by a node.
Overrides: xmlNode.newNsPropEatName

newTextChild(self, parent, name, content)

source code 
Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (None). If @ns is None, the newly created element inherits the namespace of @parent. If @content is non None, a child TEXT node will be created containing the string @content. NOTE: Use xmlNewChild() if @content will contain entities that need to be preserved. Use this function, xmlNewTextChild(), if you need to ensure that reserved XML chars that might appear in @content, such as the ampersand, greater-than or less-than signs, are automatically replaced by their XML escaped entity representations.
Overrides: xmlNode.newTextChild

setNs(self, node)

source code 
Associate a namespace to a node, a posteriori.
Overrides: xmlNode.setNs

setNsProp(self, node, name, value)

source code 
Set (or reset) an attribute carried by a node. The ns structure must be in scope, this is not checked
Overrides: xmlNode.setNsProp

unsetNsProp(self, node, name)

source code 
Remove an attribute carried by a node.
Overrides: xmlNode.unsetNsProp

xpathNodeSetFreeNs(self)

source code 
Namespace nodes in libxml don't match the XPath semantic. In a node set the namespace nodes are duplicated and the next pointer is set to the parent node in the XPath semantic. Check if such a node needs to be freed