File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""W3C Document Object Model implementation for Python.
22
3- The Python mapping of the Document Object Model is documented in <...>.
3+ The Python mapping of the Document Object Model is documented in the
4+ Python Library Reference in the section on the xml.dom package.
45
56This package contains the following modules:
67
78minidom -- A simple implementation of the Level 1 DOM with namespace
8- support added (based on the Level 2 specification).
9+ support added (based on the Level 2 specification) and other
10+ minor Level 2 functionality.
11+
12+ pulldom -- DOM builder supporting on-demand tree-building for selected
13+ subtrees of the document.
914
1015"""
16+
17+
18+ class Node :
19+ """Class giving the NodeType constants."""
20+
21+ # DOM implementations may use this as a base class for their own
22+ # Node implementations. If they don't, the constants defined here
23+ # should still be used as the canonical definitions as they match
24+ # the values given in the W3C recommendation. Client code can
25+ # safely refer to these values in all tests of Node.nodeType
26+ # values.
27+
28+ ELEMENT_NODE = 1
29+ ATTRIBUTE_NODE = 2
30+ TEXT_NODE = 3
31+ CDATA_SECTION_NODE = 4
32+ ENTITY_REFERENCE_NODE = 5
33+ ENTITY_NODE = 6
34+ PROCESSING_INSTRUCTION_NODE = 7
35+ COMMENT_NODE = 8
36+ DOCUMENT_NODE = 9
37+ DOCUMENT_TYPE_NODE = 10
38+ DOCUMENT_FRAGMENT_NODE = 11
39+ NOTATION_NODE = 12
You can’t perform that action at this time.
0 commit comments