本文整理汇总了Python中FtNode.FtNode类的典型用法代码示例。如果您正苦于以下问题:Python FtNode类的具体用法?Python FtNode怎么用?Python FtNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FtNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, name, entities, notations, publicId, systemId):
FtNode.__init__(self, None)
self.__dict__['__nodeName'] = name
self._entities = entities
self._notations = notations
self._publicId = publicId
self._systemId = systemId
#FIXME: Text repr of the entities
self._internalSubset = ''
示例2: __init__
def __init__(self, doctype):
FtNode.__init__(self, None)
self.__dict__['__doctype'] = None
self.__dict__['__implementation'] = implementation
self.__dict__['__documentElement'] = None
self.__dict__['_singleChildren'] = {Node.ELEMENT_NODE:'__documentElement',
Node.DOCUMENT_TYPE_NODE:'__doctype'
}
self._4dom_setDocumentType(doctype)
示例3: __init__
def __init__(self, doctype):
FtNode.__init__(self, None)
self.__dict__["__doctype"] = None
self.__dict__["__implementation"] = implementation
self.__dict__["__documentElement"] = None
self.__dict__["_singleChildren"] = {
Node.ELEMENT_NODE: "__documentElement",
Node.DOCUMENT_TYPE_NODE: "__doctype",
}
self._4dom_setDocumentType(doctype)
示例4: removeChild
def removeChild(self,oldChild):
node = FtNode.removeChild(self, oldChild)
if self.documentElement == node:
self.__dict__['__documentElement'] = None
if self.__dict__['__doctype'] == node:
self.__dict__['__doctype'] = None
return node
示例5: replaceChild
def replaceChild(self, newChild, oldChild):
if newChild.nodeType != Node.DOCUMENT_FRAGMENT_NODE:
root = self.__dict__['__documentElement']
if root in [oldChild, newChild]:
self.__dict__['__documentElement'] = None
else:
raise HierarchyRequestErr()
replaced = FtNode.replaceChild(self, newChild, oldChild)
if newChild.nodeType == Node.ELEMENT_NODE:
self.__dict__['__documentElement'] = newChild
if self.__dict__['__doctype']:
self.__dict__['__doctype']._4dom_setName(newChild.nodeName)
return replaced
示例6: __init__
def __init__(self, ownerDocument, nodeName, namespaceURI, prefix, localName):
FtNode.__init__(self, ownerDocument, namespaceURI, prefix, localName);
#Set our attributes
self.__dict__['__attributes'] = implementation._4dom_createNamedNodeMap(ownerDocument)
self.__dict__['__nodeName'] = nodeName
示例7: __init__
def __init__(self, ownerDocument):
FtNode.__init__(self, ownerDocument)
self.__dict__['__nodeName'] = '#document-fragment'
示例8: __init__
def __init__(self, ownerDocument, publicId, systemId, notationName):
FtNode.__init__(self, ownerDocument)
self.__dict__['__nodeName'] = '#entity'
self.__dict__['publicId'] = publicId
self.__dict__['systemId'] = systemId
self.__dict__['notationName'] = notationName
示例9: __init__
def __init__(self, ownerDocument, publicId, systemId, name):
FtNode.__init__(self, ownerDocument)
self.__dict__['__nodeName'] = name
self.__dict__['publicId'] = publicId
self.__dict__['systemId'] = systemId
示例10: __init__
def __init__(self, ownerDocument, name, namespaceURI, prefix, localName):
FtNode.__init__(self, ownerDocument, namespaceURI, prefix, localName)
self.__dict__['__nodeName'] = name
self._ownerElement = None
示例11: __init__
def __init__(self,ownerDocument,target,data):
FtNode.__init__(self,ownerDocument,EMPTY_NAMESPACE,'','')
self.__dict__['__nodeName'] = target
self.__dict__['__nodeValue'] = data
示例12: __init__
def __init__(self, ownerDocument, data):
FtNode.__init__(self, ownerDocument)
self.__dict__['__nodeValue'] = data
self._length = len(data)
示例13: _4dom_setDocumentType
def _4dom_setDocumentType(self, doctype):
if not self.__dict__['__doctype'] and doctype is not None:
self.__dict__['__doctype'] = doctype
doctype._4dom_setOwnerDocument(self)
return FtNode.appendChild(self, doctype)
示例14: insertBefore
def insertBefore(self, newChild, oldChild):
self._4dom_addSingle(newChild)
return FtNode.insertBefore(self, newChild, oldChild)
示例15: appendChild
def appendChild(self, newChild):
self._4dom_addSingle(newChild)
return FtNode.appendChild(self, newChild)