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}.
|
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
|
Break internal references within the DOM so that it will be garbage
|
||||||
collected on versions of Python without cyclic GC. Even when cyclic
|
collected on versions of Python without cyclic GC. Even when cyclic
|
||||||
GC is available, using this can make large amounts of memory available
|
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.
|
children of that node.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{writexml}{writer}
|
\begin{methoddesc}[Node]{writexml}{writer}
|
||||||
Write XML to the writer object. The writer should have a
|
Write XML to the writer object. The writer should have a
|
||||||
\method{write()} method which matches that of the file object
|
\method{write()} method which matches that of the file object
|
||||||
interface.
|
interface.
|
||||||
|
|
||||||
\versionadded[To support pretty output, new keyword parameters indent,
|
\versionchanged[To support pretty output, new keyword parameters
|
||||||
addindent, and newl have been added]{2.1}
|
\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
|
argument encoding can be used to specify the encoding field of the XML
|
||||||
header]{2.3}
|
header]{2.3}
|
||||||
|
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{toxml}{\optional{encoding}}
|
\begin{methoddesc}[Node]{toxml}{\optional{encoding}}
|
||||||
Return the XML that the DOM represents as a string.
|
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
|
With no argument, the XML header does not specify an encoding, and the
|
||||||
result is Unicode string if the default encoding cannot represent all
|
result is Unicode string if the default encoding cannot represent all
|
||||||
characters in the document. Encoding this string in an encoding other
|
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
|
unrepresentable text data, the encoding argument should be specified
|
||||||
as "utf-8".
|
as "utf-8".
|
||||||
|
|
||||||
|
\versionchanged[the \var{encoding} argument was introduced]{2.3}
|
||||||
\end{methoddesc}
|
\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
|
Return a pretty-printed version of the document. \var{indent} specifies
|
||||||
the indentation string and defaults to a tabulator; \var{newl} 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.
|
the string emitted at the end of each line and defaults to \\n.
|
||||||
|
|
||||||
\versionadded{2.1}
|
\versionadded{2.1}
|
||||||
|
\versionchanged[the encoding argument; see \method{toxml()}]{2.3}
|
||||||
\versionadded[the encoding argument; see \method{toxml}]{2.3}
|
|
||||||
|
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
The following standard DOM methods have special considerations with
|
The following standard DOM methods have special considerations with
|
||||||
\refmodule{xml.dom.minidom}:
|
\refmodule{xml.dom.minidom}:
|
||||||
|
|
||||||
\begin{methoddesc}{cloneNode}{deep}
|
\begin{methoddesc}[Node]{cloneNode}{deep}
|
||||||
Although this method was present in the version of
|
Although this method was present in the version of
|
||||||
\refmodule{xml.dom.minidom} packaged with Python 2.0, it was seriously
|
\refmodule{xml.dom.minidom} packaged with Python 2.0, it was seriously
|
||||||
broken. This has been corrected for subsequent releases.
|
broken. This has been corrected for subsequent releases.
|
||||||
|
|
Loading…
Reference in New Issue