1"""Core XML support for Python.
2
3This package contains four sub-packages:
4
5dom -- The W3C Document Object Model.  This supports DOM Level 1 +
6       Namespaces.
7
8parsers -- Python wrappers for XML parsers (currently only supports Expat).
9
10sax -- The Simple API for XML, developed by XML-Dev, led by David
11       Megginson and ported to Python by Lars Marius Garshol.  This
12       supports the SAX 2 API.
13
14etree -- The ElementTree XML library.  This is a subset of the full
15       ElementTree XML release.
16
17"""
18
19
20__all__ = ["dom", "parsers", "sax", "etree"]
21
22_MINIMUM_XMLPLUS_VERSION = (0, 8, 4)
23
24
25try:
26    import _xmlplus
27except ImportError:
28    pass
29else:
30    try:
31        v = _xmlplus.version_info
32    except AttributeError:
33        # _xmlplus is too old; ignore it
34        pass
35    else:
36        if v >= _MINIMUM_XMLPLUS_VERSION:
37            import sys
38            _xmlplus.__path__.extend(__path__)
39            sys.modules[__name__] = _xmlplus
40        else:
41            del v
42