Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions Doc/library/xml.dom.minidom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,24 @@ rules apply:
Instead, :mod:`!xml.dom.minidom` uses standard Python exceptions such as
:exc:`TypeError` and :exc:`AttributeError`.

* :class:`NodeList` objects are implemented using Python's built-in list type.
These objects provide the interface defined in the DOM specification, but with
earlier versions of Python they do not support the official API. They are,
however, much more "Pythonic" than the interface defined in the W3C
recommendations.
* Each of the :class:`~xml.dom.NodeList` and :class:`~xml.dom.NamedNodeMap`
interfaces has two implementations, which provide additional methods and
operations.

:attr:`~xml.dom.Node.childNodes` is a subclass of :class:`list`, or, for
nodes which cannot have children, a subclass of :class:`tuple`.
It supports iteration, concatenation, indexing and slicing.

:attr:`~xml.dom.Node.attributes` supports ``len()``, the :keyword:`in`
operator, subscription by a name or by a ``(namespaceURI, localName)``
tuple, assignment and deletion, and the methods :meth:`!get`, :meth:`!keys`,
:meth:`!keysNS`, :meth:`!values`, :meth:`!items` and :meth:`!itemsNS`.
:attr:`~xml.dom.DocumentType.entities` and
:attr:`~xml.dom.DocumentType.notations` are read-only and support only
``len()`` and subscription by a name.

* :attr:`~xml.dom.Document.strictErrorChecking` and
:attr:`~xml.dom.Attr.specified` are always ``False``.

The following interfaces have no implementation in :mod:`!xml.dom.minidom`:

Expand Down
Loading
Loading