8.12.1 XMLReader Objects
The XMLReader interface supports the following methods:
- Process an input source, producing SAX events. The source object can be a system identifier (a string identifying the input source - typically a file name or an URL), a file-like object, or an InputSource object. When parse() returns, the input is completely processed, and the parser object can be discarded or reset. As a limitation, the current implementation only accepts byte streams; processing of character streams is for further study.
- Return the current ContentHandler.
- Set the current ContentHandler. If no ContentHandler is set, content events will be discarded.
- Return the current DTDHandler.
- Set the current DTDHandler. If no DTDHandler is set, DTD events will be discarded.
- Return the current EntityResolver.
- Set the current EntityResolver. If no EntityResolver is set, attempts to resolve an external entity will result in opening the system identifier for the entity, and fail if it is not available.
- Return the current ErrorHandler.
- Set the current error handler. If no ErrorHandler is set, errors will be raised as exceptions, and warnings will be printed.
-
Allow an application to set the locale for errors and warnings.
SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, however, they must throw a SAX exception. Applications may request a locale change in the middle of a parse.
- Return the current setting for feature featurename. If the feature is not recognized, SAXNotRecognizedException is raised. The well-known featurenames are listed in the module xml.sax.handler.
- Set the featurename to value. If the feature is not recognized, SAXNotRecognizedException is raised. If the feature or its setting is not supported by the parser, SAXNotSupportedException is raised.
- Return the current setting for property propertyname. If the property is not recognized, a SAXNotRecognizedException is raised. The well-known propertynames are listed in the module xml.sax.handler.
- Set the propertyname to value. If the property is not recognized, SAXNotRecognizedException is raised. If the property or its setting is not supported by the parser, SAXNotSupportedException is raised.
See About this document... for information on suggesting changes.