_makeParentNodes = 1
debug = None
childNodeTypes = ()
-
+
def __init__(self):
self.childNodes = []
self.parentNode = None
if oldChild.nextSibling is not None:
oldChild.nextSibling.previousSibling = oldChild.previousSibling
if oldChild.previousSibling is not None:
- oldChild.previousSibling.nextSibling = oldChild.nextSibling
+ oldChild.previousSibling.nextSibling = oldChild.nextSibling
oldChild.nextSibling = oldChild.previousSibling = None
-
+
if self._makeParentNodes:
oldChild.parentNode = None
return oldChild
attributes = None
ownerElement = None
childNodeTypes = (Node.TEXT_NODE, Node.ENTITY_REFERENCE_NODE)
-
+
def __init__(self, qName, namespaceURI="", localName=None, prefix=None):
# skip setattr for performance
d = self.__dict__
childNodeTypes = (Node.ELEMENT_NODE, Node.PROCESSING_INSTRUCTION_NODE,
Node.COMMENT_NODE, Node.TEXT_NODE,
Node.CDATA_SECTION_NODE, Node.ENTITY_REFERENCE_NODE)
-
+
def __init__(self, tagName, namespaceURI="", prefix="",
localName=None):
Node.__init__(self)
def hasAttribute(self, name):
return self._attrs.has_key(name)
-
+
def hasAttributeNS(self, namespaceURI, localName):
- return self._attrsNS.has_key((namespaceURI, localName))
-
+ return self._attrsNS.has_key((namespaceURI, localName))
+
def getElementsByTagName(self, name):
return _getElementsByTagNameHelper(self, name, [])
nodeName = "#comment"
attributes = None
childNodeTypes = ()
-
+
def __init__(self, data):
Node.__init__(self)
self.data = self.nodeValue = data
nodeType = Node.PROCESSING_INSTRUCTION_NODE
attributes = None
childNodeTypes = ()
-
+
def __init__(self, target, data):
Node.__init__(self)
self.target = self.nodeName = target
nodeName = "#text"
attributes = None
childNodeTypes = ()
-
+
def __init__(self, data):
if type(data) not in _StringTypes:
raise TypeError, "node contents must be a string"
oldChild.parentNode = None
if self.documentElement is oldChild:
self.documentElement = None
-
+
return oldChild
def _get_documentElement(self):