expatreader -- Driver that allows use of the Expat parser with SAX.
"""
-from xmlreader import InputSource
-from handler import ContentHandler, ErrorHandler
-from _exceptions import SAXException, SAXNotRecognizedException, \
- SAXParseException, SAXNotSupportedException, \
- SAXReaderNotAvailable
+from .xmlreader import InputSource
+from .handler import ContentHandler, ErrorHandler
+from ._exceptions import (SAXException, SAXNotRecognizedException,
+ SAXParseException, SAXNotSupportedException,
+ SAXReaderNotAvailable)
def parse(source, handler, errorHandler=ErrorHandler()):
"""
import os, urlparse, urllib, types
-import handler
-import xmlreader
+from . import handler
+from . import xmlreader
try:
_StringTypes = [types.StringType, types.UnicodeType]
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers
should be based on this code. """
-import handler
+from . import handler
-from _exceptions import SAXNotSupportedException, SAXNotRecognizedException
+from ._exceptions import SAXNotSupportedException, SAXNotRecognizedException
# ===== XMLREADER =====