mirror of https://github.com/python/cpython
Cleanup the docs ElementTree a bit.
This commit is contained in:
commit
9e189f0a28
|
@ -761,9 +761,9 @@ ElementTree Objects
|
|||
*xml_declaration* controls if an XML declaration should be added to the
|
||||
file. Use ``False`` for never, ``True`` for always, ``None``
|
||||
for only if not US-ASCII or UTF-8 or Unicode (default is ``None``).
|
||||
*default_namespace* sets the default XML namespace (for "xmlns").
|
||||
*method* is either ``"xml"``, ``"html"`` or ``"text"`` (default is
|
||||
``"xml"``). *default_namespace* sets the default XML namespace (for
|
||||
"xmlns").
|
||||
``"xml"``).
|
||||
The keyword-only *short_empty_elements* parameter controls the formatting
|
||||
of elements that contain no content. If *True* (the default), they are
|
||||
emitted as a single self-closed tag, otherwise they are emitted as a pair
|
||||
|
|
|
@ -786,13 +786,13 @@ class ElementTree:
|
|||
method=None, *,
|
||||
short_empty_elements=True):
|
||||
"""Write the element tree to a file, as XML. 'file_or_filename' is a
|
||||
file name or a file object opened for writing. 'encoding' is the
|
||||
output encoding (default is US-ASCII). 'xml_declaration' controls
|
||||
if an XML declaration should be added to the output. Use False
|
||||
for never, True for always, None for only if not US-ASCII or
|
||||
UTF-8 or Unicode (default is None). 'method' is either "xml"
|
||||
(default), "html", "text" or "c14n".
|
||||
file name or a file object opened for writing.
|
||||
'encoding' is the output encoding (default is US-ASCII).
|
||||
'xml_declaration' controls if an XML declaration should be added
|
||||
to the output. Use False for never, True for always, None for only
|
||||
if not US-ASCII or UTF-8 or Unicode (default is None).
|
||||
'default_namespace' sets the default XML namespace (for "xmlns").
|
||||
'method' is either "xml" (default), "html", "text" or "c14n".
|
||||
The keyword-only 'short_empty_elements' parameter controls the
|
||||
formatting of elements that contain no content. If True (default),
|
||||
they are emitted as a single self-closed tag, otherwise they are
|
||||
|
|
Loading…
Reference in New Issue