summaryrefslogtreecommitdiffstats
path: root/Doc/library/xml.sax.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/xml.sax.rst')
-rw-r--r--Doc/library/xml.sax.rst13
1 files changed, 6 insertions, 7 deletions
diff --git a/Doc/library/xml.sax.rst b/Doc/library/xml.sax.rst
index 163833c..1bf55b4 100644
--- a/Doc/library/xml.sax.rst
+++ b/Doc/library/xml.sax.rst
@@ -1,4 +1,3 @@
-
:mod:`xml.sax` --- Support for SAX2 parsers
===========================================
@@ -17,7 +16,7 @@ the SAX API.
The convenience functions are:
-.. function:: make_parser([parser_list])
+.. function:: make_parser(parser_list=[])
Create and return a SAX :class:`XMLReader` object. The first parser found will
be used. If *parser_list* is provided, it must be a sequence of strings which
@@ -25,7 +24,7 @@ The convenience functions are:
in *parser_list* will be used before modules in the default list of parsers.
-.. function:: parse(filename_or_stream, handler[, error_handler])
+.. function:: parse(filename_or_stream, handler, error_handler=handler.ErrorHandler())
Create a SAX parser and use it to parse a document. The document, passed in as
*filename_or_stream*, can be a filename or a file object. The *handler*
@@ -35,7 +34,7 @@ The convenience functions are:
return value; all work must be done by the *handler* passed in.
-.. function:: parseString(string, handler[, error_handler])
+.. function:: parseString(string, handler, error_handler=handler.ErrorHandler())
Similar to :func:`parse`, but parses from a buffer *string* received as a
parameter.
@@ -66,7 +65,7 @@ In addition to these classes, :mod:`xml.sax` provides the following exception
classes.
-.. exception:: SAXException(msg[, exception])
+.. exception:: SAXException(msg, exception=None)
Encapsulate an XML error or warning. This class can contain basic error or
warning information from either the XML parser or the application: it can be
@@ -90,14 +89,14 @@ classes.
interface as well as the :class:`SAXException` interface.
-.. exception:: SAXNotRecognizedException(msg[, exception])
+.. exception:: SAXNotRecognizedException(msg, exception=None)
Subclass of :exc:`SAXException` raised when a SAX :class:`XMLReader` is
confronted with an unrecognized feature or property. SAX applications and
extensions may use this class for similar purposes.
-.. exception:: SAXNotSupportedException(msg[, exception])
+.. exception:: SAXNotSupportedException(msg, exception=None)
Subclass of :exc:`SAXException` raised when a SAX :class:`XMLReader` is asked to
enable a feature that is not supported, or to set a property to a value that the