mirror of https://github.com/python/cpython
- make sure the methods minidom adds to the basic DOM are attributed
to Node objects in the index (closes SF bug #832251) - fix a variety of markup nits Someone should backport this patch to Python 2.3.x.
This commit is contained in:
parent
ff365c931b
commit
267b062432
|
@ -127,7 +127,7 @@ The definition of the DOM API for Python is given as part of the
|
|||
differences between the API and \refmodule{xml.dom.minidom}.
|
||||
|
||||
|
||||
\begin{methoddesc}{unlink}{}
|
||||
\begin{methoddesc}[Node]{unlink}{}
|
||||
Break internal references within the DOM so that it will be garbage
|
||||
collected on versions of Python without cyclic GC. Even when cyclic
|
||||
GC is available, using this can make large amounts of memory available
|
||||
|
@ -137,25 +137,22 @@ needed is good practice. This only needs to be called on the
|
|||
children of that node.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}{writexml}{writer}
|
||||
\begin{methoddesc}[Node]{writexml}{writer}
|
||||
Write XML to the writer object. The writer should have a
|
||||
\method{write()} method which matches that of the file object
|
||||
interface.
|
||||
|
||||
\versionadded[To support pretty output, new keyword parameters indent,
|
||||
addindent, and newl have been added]{2.1}
|
||||
\versionchanged[To support pretty output, new keyword parameters
|
||||
\var{indent}, \var{addindent}, and \var{newl} have been added]{2.1}
|
||||
|
||||
\versionadded[For the \class{Document} node, an additional keyword
|
||||
\versionchanged[For the \class{Document} node, an additional keyword
|
||||
argument encoding can be used to specify the encoding field of the XML
|
||||
header]{2.3}
|
||||
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}{toxml}{\optional{encoding}}
|
||||
\begin{methoddesc}[Node]{toxml}{\optional{encoding}}
|
||||
Return the XML that the DOM represents as a string.
|
||||
|
||||
\versionadded[the \var{encoding} argument]{2.3}
|
||||
|
||||
With no argument, the XML header does not specify an encoding, and the
|
||||
result is Unicode string if the default encoding cannot represent all
|
||||
characters in the document. Encoding this string in an encoding other
|
||||
|
@ -168,24 +165,22 @@ always specified. To avoid UnicodeError exceptions in case of
|
|||
unrepresentable text data, the encoding argument should be specified
|
||||
as "utf-8".
|
||||
|
||||
\versionchanged[the \var{encoding} argument was introduced]{2.3}
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}{toprettyxml}{\optional{indent\optional{, newl}}}
|
||||
|
||||
\begin{methoddesc}[Node]{toprettyxml}{\optional{indent\optional{, newl}}}
|
||||
Return a pretty-printed version of the document. \var{indent} specifies
|
||||
the indentation string and defaults to a tabulator; \var{newl} specifies
|
||||
the string emitted at the end of each line and defaults to \\n.
|
||||
|
||||
\versionadded{2.1}
|
||||
|
||||
\versionadded[the encoding argument; see \method{toxml}]{2.3}
|
||||
|
||||
\versionchanged[the encoding argument; see \method{toxml()}]{2.3}
|
||||
\end{methoddesc}
|
||||
|
||||
The following standard DOM methods have special considerations with
|
||||
\refmodule{xml.dom.minidom}:
|
||||
|
||||
\begin{methoddesc}{cloneNode}{deep}
|
||||
\begin{methoddesc}[Node]{cloneNode}{deep}
|
||||
Although this method was present in the version of
|
||||
\refmodule{xml.dom.minidom} packaged with Python 2.0, it was seriously
|
||||
broken. This has been corrected for subsequent releases.
|
||||
|
|
Loading…
Reference in New Issue