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