Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/xml.sax.rst

    r2 r391  
    1717the SAX API.
    1818
     19
     20.. warning::
     21
     22   The :mod:`xml.sax` module is not secure against maliciously
     23   constructed data.  If you need to parse untrusted or unauthenticated data see
     24   :ref:`xml-vulnerabilities`.
     25
     26
    1927The convenience functions are:
    2028
     
    2230.. function:: make_parser([parser_list])
    2331
    24    Create and return a SAX :class:`XMLReader` object.  The first parser found will
     32   Create and return a SAX :class:`~xml.sax.xmlreader.XMLReader` object.  The
     33   first parser found will
    2534   be used.  If *parser_list* is provided, it must be a sequence of strings which
    2635   name modules that have a function named :func:`create_parser`.  Modules listed
     
    3241   Create a SAX parser and use it to parse a document.  The document, passed in as
    3342   *filename_or_stream*, can be a filename or a file object.  The *handler*
    34    parameter needs to be a SAX :class:`ContentHandler` instance.  If
    35    *error_handler* is given, it must be a SAX :class:`ErrorHandler` instance; if
     43   parameter needs to be a SAX :class:`~handler.ContentHandler` instance.  If
     44   *error_handler* is given, it must be a SAX :class:`~handler.ErrorHandler`
     45   instance; if
    3646   omitted,  :exc:`SAXParseException` will be raised on all errors.  There is no
    3747   return value; all work must be done by the *handler* passed in.
     
    5868notion of interface, they are formally introduced as classes, but applications
    5969may use implementations which do not inherit from the provided classes.  The
    60 :class:`InputSource`, :class:`Locator`, :class:`Attributes`,
    61 :class:`AttributesNS`, and :class:`XMLReader` interfaces are defined in the
     70:class:`~xml.sax.xmlreader.InputSource`, :class:`~xml.sax.xmlreader.Locator`,
     71:class:`~xml.sax.xmlreader.Attributes`, :class:`~xml.sax.xmlreader.AttributesNS`,
     72and :class:`~xml.sax.xmlreader.XMLReader` interfaces are defined in the
    6273module :mod:`xml.sax.xmlreader`.  The handler interfaces are defined in
    63 :mod:`xml.sax.handler`.  For convenience, :class:`InputSource` (which is often
     74:mod:`xml.sax.handler`.  For convenience,
     75:class:`~xml.sax.xmlreader.InputSource` (which is often
    6476instantiated directly) and the handler classes are also available from
    6577:mod:`xml.sax`.  These interfaces are described below.
     
    7486   warning information from either the XML parser or the application: it can be
    7587   subclassed to provide additional functionality or to add localization.  Note
    76    that although the handlers defined in the :class:`ErrorHandler` interface
     88   that although the handlers defined in the
     89   :class:`~xml.sax.handler.ErrorHandler` interface
    7790   receive instances of this exception, it is not required to actually raise the
    7891   exception --- it is also useful as a container for information.
     
    87100.. exception:: SAXParseException(msg, exception, locator)
    88101
    89    Subclass of :exc:`SAXException` raised on parse errors. Instances of this class
    90    are passed to the methods of the SAX :class:`ErrorHandler` interface to provide
    91    information about the parse error.  This class supports the SAX :class:`Locator`
    92    interface as well as the :class:`SAXException` interface.
     102   Subclass of :exc:`SAXException` raised on parse errors. Instances of this
     103   class are passed to the methods of the SAX
     104   :class:`~xml.sax.handler.ErrorHandler` interface to provide information
     105   about the parse error.  This class supports the SAX
     106   :class:`~xml.sax.xmlreader.Locator` interface as well as the
     107   :class:`SAXException` interface.
    93108
    94109
    95110.. exception:: SAXNotRecognizedException(msg[, exception])
    96111
    97    Subclass of :exc:`SAXException` raised when a SAX :class:`XMLReader` is
     112   Subclass of :exc:`SAXException` raised when a SAX
     113   :class:`~xml.sax.xmlreader.XMLReader` is
    98114   confronted with an unrecognized feature or property.  SAX applications and
    99115   extensions may use this class for similar purposes.
     
    102118.. exception:: SAXNotSupportedException(msg[, exception])
    103119
    104    Subclass of :exc:`SAXException` raised when a SAX :class:`XMLReader` is asked to
     120   Subclass of :exc:`SAXException` raised when a SAX
     121   :class:`~xml.sax.xmlreader.XMLReader` is asked to
    105122   enable a feature that is not supported, or to set a property to a value that the
    106123   implementation does not support.  SAX applications and extensions may use this
Note: See TracChangeset for help on using the changeset viewer.