| 1 | # This is the Python mapping for interface NodeFilter from |
| 2 | # DOM2-Traversal-Range. It contains only constants. |
| 3 | |
| 4 | class NodeFilter: |
| 5 | """ |
| 6 | This is the DOM2 NodeFilter interface. It contains only constants. |
| 7 | """ |
| 8 | FILTER_ACCEPT = 1 |
| 9 | FILTER_REJECT = 2 |
| 10 | FILTER_SKIP = 3 |
| 11 | |
| 12 | SHOW_ALL = 0xFFFFFFFFL |
| 13 | SHOW_ELEMENT = 0x00000001 |
| 14 | SHOW_ATTRIBUTE = 0x00000002 |
| 15 | SHOW_TEXT = 0x00000004 |
| 16 | SHOW_CDATA_SECTION = 0x00000008 |
| 17 | SHOW_ENTITY_REFERENCE = 0x00000010 |
| 18 | SHOW_ENTITY = 0x00000020 |
| 19 | SHOW_PROCESSING_INSTRUCTION = 0x00000040 |
| 20 | SHOW_COMMENT = 0x00000080 |
| 21 | SHOW_DOCUMENT = 0x00000100 |
| 22 | SHOW_DOCUMENT_TYPE = 0x00000200 |
| 23 | SHOW_DOCUMENT_FRAGMENT = 0x00000400 |
| 24 | SHOW_NOTATION = 0x00000800 |
| 25 | |
| 26 | def acceptNode(self, node): |
| 27 | raise NotImplementedError |