Fred Drake | e85c350 | 2000-06-29 19:28:01 +0000 | [diff] [blame] | 1 | """Core XML support for Python. |
| 2 | |
| 3 | This package contains three sub-packages: |
| 4 | |
| 5 | dom -- The W3C Document Object Model. This supports DOM Level 1 + |
| 6 | Namespaces. |
| 7 | |
Fred Drake | 327e187 | 2000-08-01 00:05:16 +0000 | [diff] [blame] | 8 | parsers -- Python wrappers for XML parsers (currently only supports Expat). |
Fred Drake | e85c350 | 2000-06-29 19:28:01 +0000 | [diff] [blame] | 9 | |
| 10 | sax -- The Simple API for XML, developed by XML-Dev, led by David |
Fred Drake | 16f6329 | 2000-10-23 18:09:50 +0000 | [diff] [blame] | 11 | Megginson and ported to Python by Lars Marius Garshol. This |
Paul Prescod | 73678da | 2000-07-01 04:58:47 +0000 | [diff] [blame] | 12 | supports the SAX 2 API. |
Fred Drake | e85c350 | 2000-06-29 19:28:01 +0000 | [diff] [blame] | 13 | """ |
Fred Drake | 327e187 | 2000-08-01 00:05:16 +0000 | [diff] [blame] | 14 | |
| 15 | |
Fred Drake | af57431 | 2000-09-25 17:30:17 +0000 | [diff] [blame] | 16 | __all__ = ["dom", "parsers", "sax"] |
| 17 | |
Martin v. Löwis | c9494ac | 2001-03-27 08:42:12 +0000 | [diff] [blame] | 18 | # When being checked-out without options, this has the form |
| 19 | # "<dollar>Revision: x.y </dollar>" |
| 20 | # When exported using -kv, it is "x.y". |
Martin v. Löwis | 764dad5 | 2001-03-27 21:38:15 +0000 | [diff] [blame] | 21 | __version__ = "$Revision$".split()[-2:][0] |
Fred Drake | af57431 | 2000-09-25 17:30:17 +0000 | [diff] [blame] | 22 | |
| 23 | |
| 24 | _MINIMUM_XMLPLUS_VERSION = (0, 6, 1) |
| 25 | |
| 26 | |
Fred Drake | 5750017 | 2000-08-04 03:14:55 +0000 | [diff] [blame] | 27 | try: |
| 28 | import _xmlplus |
| 29 | except ImportError: |
| 30 | pass |
| 31 | else: |
Fred Drake | af57431 | 2000-09-25 17:30:17 +0000 | [diff] [blame] | 32 | try: |
| 33 | v = _xmlplus.version_info |
| 34 | except AttributeError: |
| 35 | # _xmlplue is too old; ignore it |
| 36 | pass |
| 37 | else: |
| 38 | if v >= _MINIMUM_XMLPLUS_VERSION: |
| 39 | import sys |
| 40 | sys.modules[__name__] = _xmlplus |
| 41 | else: |
| 42 | del v |