• Fred Drake's avatar
    expunge the xmlcore changes: · fbdeaad0
    Fred Drake yazdı
      41667, 41668 - initial switch to xmlcore
      47044        - mention of xmlcore in What's New
      50687        - mention of xmlcore in the library reference
    
    re-apply xmlcore changes to xml:
      41674        - line ending changes (re-applied manually), directory props
      41677        - add cElementTree wrapper
      41678        - PSF licensing for etree
      41812        - whitespace normalization
      42724        - fix svn:eol-style settings
      43681, 43682 - remove Python version-compatibility cruft from minidom
      46773        - fix encoding of \r\n\t in attr values in saxutils
      47269        - added XMLParser alias for cElementTree compatibility
    
    additional tests were added in Lib/test/test_sax.py that failed with
    the xmlcore changes; these relate to SF bugs #1511497, #1513611
    fbdeaad0
NodeFilter.py 937 Bytes
# This is the Python mapping for interface NodeFilter from
# DOM2-Traversal-Range. It contains only constants.

class NodeFilter:
    """
    This is the DOM2 NodeFilter interface. It contains only constants.
    """
    FILTER_ACCEPT = 1
    FILTER_REJECT = 2
    FILTER_SKIP   = 3

    SHOW_ALL                    = 0xFFFFFFFFL
    SHOW_ELEMENT                = 0x00000001
    SHOW_ATTRIBUTE              = 0x00000002
    SHOW_TEXT                   = 0x00000004
    SHOW_CDATA_SECTION          = 0x00000008
    SHOW_ENTITY_REFERENCE       = 0x00000010
    SHOW_ENTITY                 = 0x00000020
    SHOW_PROCESSING_INSTRUCTION = 0x00000040
    SHOW_COMMENT                = 0x00000080
    SHOW_DOCUMENT               = 0x00000100
    SHOW_DOCUMENT_TYPE          = 0x00000200
    SHOW_DOCUMENT_FRAGMENT      = 0x00000400
    SHOW_NOTATION               = 0x00000800

    def acceptNode(self, node):
        raise NotImplementedError