blob: 1e21815ae77d99d0bd8c107fc10c556c87ec5b8e [file] [log] [blame]
Fred Drakee85c3502000-06-29 19:28:01 +00001"""Core XML support for Python.
2
3This package contains three sub-packages:
4
5dom -- The W3C Document Object Model. This supports DOM Level 1 +
6 Namespaces.
7
Fred Drake327e1872000-08-01 00:05:16 +00008parsers -- Python wrappers for XML parsers (currently only supports Expat).
Fred Drakee85c3502000-06-29 19:28:01 +00009
10sax -- The Simple API for XML, developed by XML-Dev, led by David
Fred Drake16f63292000-10-23 18:09:50 +000011 Megginson and ported to Python by Lars Marius Garshol. This
Paul Prescod73678da2000-07-01 04:58:47 +000012 supports the SAX 2 API.
Fred Drakee85c3502000-06-29 19:28:01 +000013"""
Fred Drake327e1872000-08-01 00:05:16 +000014
15
Fred Drakeaf574312000-09-25 17:30:17 +000016__all__ = ["dom", "parsers", "sax"]
17
Martin v. Löwisc9494ac2001-03-27 08:42:12 +000018# 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öwis764dad52001-03-27 21:38:15 +000021__version__ = "$Revision$".split()[-2:][0]
Fred Drakeaf574312000-09-25 17:30:17 +000022
23
Martin v. Löwisadfa7402002-06-30 15:08:22 +000024_MINIMUM_XMLPLUS_VERSION = (0, 6, 5)
Fred Drakeaf574312000-09-25 17:30:17 +000025
26
Fred Drake57500172000-08-04 03:14:55 +000027try:
28 import _xmlplus
29except ImportError:
30 pass
31else:
Fred Drakeaf574312000-09-25 17:30:17 +000032 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