Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../usr/lib64/python3..../xml/dom
File: __init__.py
"""W3C Document Object Model implementation for Python.
[0] Fix | Delete
[1] Fix | Delete
The Python mapping of the Document Object Model is documented in the
[2] Fix | Delete
Python Library Reference in the section on the xml.dom package.
[3] Fix | Delete
[4] Fix | Delete
This package contains the following modules:
[5] Fix | Delete
[6] Fix | Delete
minidom -- A simple implementation of the Level 1 DOM with namespace
[7] Fix | Delete
support added (based on the Level 2 specification) and other
[8] Fix | Delete
minor Level 2 functionality.
[9] Fix | Delete
[10] Fix | Delete
pulldom -- DOM builder supporting on-demand tree-building for selected
[11] Fix | Delete
subtrees of the document.
[12] Fix | Delete
[13] Fix | Delete
"""
[14] Fix | Delete
[15] Fix | Delete
[16] Fix | Delete
class Node:
[17] Fix | Delete
"""Class giving the NodeType constants."""
[18] Fix | Delete
__slots__ = ()
[19] Fix | Delete
[20] Fix | Delete
# DOM implementations may use this as a base class for their own
[21] Fix | Delete
# Node implementations. If they don't, the constants defined here
[22] Fix | Delete
# should still be used as the canonical definitions as they match
[23] Fix | Delete
# the values given in the W3C recommendation. Client code can
[24] Fix | Delete
# safely refer to these values in all tests of Node.nodeType
[25] Fix | Delete
# values.
[26] Fix | Delete
[27] Fix | Delete
ELEMENT_NODE = 1
[28] Fix | Delete
ATTRIBUTE_NODE = 2
[29] Fix | Delete
TEXT_NODE = 3
[30] Fix | Delete
CDATA_SECTION_NODE = 4
[31] Fix | Delete
ENTITY_REFERENCE_NODE = 5
[32] Fix | Delete
ENTITY_NODE = 6
[33] Fix | Delete
PROCESSING_INSTRUCTION_NODE = 7
[34] Fix | Delete
COMMENT_NODE = 8
[35] Fix | Delete
DOCUMENT_NODE = 9
[36] Fix | Delete
DOCUMENT_TYPE_NODE = 10
[37] Fix | Delete
DOCUMENT_FRAGMENT_NODE = 11
[38] Fix | Delete
NOTATION_NODE = 12
[39] Fix | Delete
[40] Fix | Delete
[41] Fix | Delete
#ExceptionCode
[42] Fix | Delete
INDEX_SIZE_ERR = 1
[43] Fix | Delete
DOMSTRING_SIZE_ERR = 2
[44] Fix | Delete
HIERARCHY_REQUEST_ERR = 3
[45] Fix | Delete
WRONG_DOCUMENT_ERR = 4
[46] Fix | Delete
INVALID_CHARACTER_ERR = 5
[47] Fix | Delete
NO_DATA_ALLOWED_ERR = 6
[48] Fix | Delete
NO_MODIFICATION_ALLOWED_ERR = 7
[49] Fix | Delete
NOT_FOUND_ERR = 8
[50] Fix | Delete
NOT_SUPPORTED_ERR = 9
[51] Fix | Delete
INUSE_ATTRIBUTE_ERR = 10
[52] Fix | Delete
INVALID_STATE_ERR = 11
[53] Fix | Delete
SYNTAX_ERR = 12
[54] Fix | Delete
INVALID_MODIFICATION_ERR = 13
[55] Fix | Delete
NAMESPACE_ERR = 14
[56] Fix | Delete
INVALID_ACCESS_ERR = 15
[57] Fix | Delete
VALIDATION_ERR = 16
[58] Fix | Delete
[59] Fix | Delete
[60] Fix | Delete
class DOMException(Exception):
[61] Fix | Delete
"""Abstract base class for DOM exceptions.
[62] Fix | Delete
Exceptions with specific codes are specializations of this class."""
[63] Fix | Delete
[64] Fix | Delete
def __init__(self, *args, **kw):
[65] Fix | Delete
if self.__class__ is DOMException:
[66] Fix | Delete
raise RuntimeError(
[67] Fix | Delete
"DOMException should not be instantiated directly")
[68] Fix | Delete
Exception.__init__(self, *args, **kw)
[69] Fix | Delete
[70] Fix | Delete
def _get_code(self):
[71] Fix | Delete
return self.code
[72] Fix | Delete
[73] Fix | Delete
[74] Fix | Delete
class IndexSizeErr(DOMException):
[75] Fix | Delete
code = INDEX_SIZE_ERR
[76] Fix | Delete
[77] Fix | Delete
class DomstringSizeErr(DOMException):
[78] Fix | Delete
code = DOMSTRING_SIZE_ERR
[79] Fix | Delete
[80] Fix | Delete
class HierarchyRequestErr(DOMException):
[81] Fix | Delete
code = HIERARCHY_REQUEST_ERR
[82] Fix | Delete
[83] Fix | Delete
class WrongDocumentErr(DOMException):
[84] Fix | Delete
code = WRONG_DOCUMENT_ERR
[85] Fix | Delete
[86] Fix | Delete
class InvalidCharacterErr(DOMException):
[87] Fix | Delete
code = INVALID_CHARACTER_ERR
[88] Fix | Delete
[89] Fix | Delete
class NoDataAllowedErr(DOMException):
[90] Fix | Delete
code = NO_DATA_ALLOWED_ERR
[91] Fix | Delete
[92] Fix | Delete
class NoModificationAllowedErr(DOMException):
[93] Fix | Delete
code = NO_MODIFICATION_ALLOWED_ERR
[94] Fix | Delete
[95] Fix | Delete
class NotFoundErr(DOMException):
[96] Fix | Delete
code = NOT_FOUND_ERR
[97] Fix | Delete
[98] Fix | Delete
class NotSupportedErr(DOMException):
[99] Fix | Delete
code = NOT_SUPPORTED_ERR
[100] Fix | Delete
[101] Fix | Delete
class InuseAttributeErr(DOMException):
[102] Fix | Delete
code = INUSE_ATTRIBUTE_ERR
[103] Fix | Delete
[104] Fix | Delete
class InvalidStateErr(DOMException):
[105] Fix | Delete
code = INVALID_STATE_ERR
[106] Fix | Delete
[107] Fix | Delete
class SyntaxErr(DOMException):
[108] Fix | Delete
code = SYNTAX_ERR
[109] Fix | Delete
[110] Fix | Delete
class InvalidModificationErr(DOMException):
[111] Fix | Delete
code = INVALID_MODIFICATION_ERR
[112] Fix | Delete
[113] Fix | Delete
class NamespaceErr(DOMException):
[114] Fix | Delete
code = NAMESPACE_ERR
[115] Fix | Delete
[116] Fix | Delete
class InvalidAccessErr(DOMException):
[117] Fix | Delete
code = INVALID_ACCESS_ERR
[118] Fix | Delete
[119] Fix | Delete
class ValidationErr(DOMException):
[120] Fix | Delete
code = VALIDATION_ERR
[121] Fix | Delete
[122] Fix | Delete
class UserDataHandler:
[123] Fix | Delete
"""Class giving the operation constants for UserDataHandler.handle()."""
[124] Fix | Delete
[125] Fix | Delete
# Based on DOM Level 3 (WD 9 April 2002)
[126] Fix | Delete
[127] Fix | Delete
NODE_CLONED = 1
[128] Fix | Delete
NODE_IMPORTED = 2
[129] Fix | Delete
NODE_DELETED = 3
[130] Fix | Delete
NODE_RENAMED = 4
[131] Fix | Delete
[132] Fix | Delete
XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"
[133] Fix | Delete
XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"
[134] Fix | Delete
XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml"
[135] Fix | Delete
EMPTY_NAMESPACE = None
[136] Fix | Delete
EMPTY_PREFIX = None
[137] Fix | Delete
[138] Fix | Delete
from .domreg import getDOMImplementation, registerDOMImplementation
[139] Fix | Delete
[140] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function