diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-13 22:24:27 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-13 22:24:27 +0200 |
commit | 9e189f0a28ed99a29915dda839b913109a178111 (patch) | |
tree | 3471191876df04e838498f52efbc0949e90e5a51 /Doc/library/xml.etree.elementtree.rst | |
parent | e9af827fb1682a2378d189b4e7cb8ead405a991b (diff) | |
parent | f1b045f41740b1e25ecb5fc4f75003fac59c118a (diff) | |
download | cpython-git-9e189f0a28ed99a29915dda839b913109a178111.tar.gz |
Cleanup the docs ElementTree a bit.
Diffstat (limited to 'Doc/library/xml.etree.elementtree.rst')
-rw-r--r-- | Doc/library/xml.etree.elementtree.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index 88855d952f..2a9f9b30b0 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -428,7 +428,7 @@ Functions arguments. Returns an element instance. -.. function:: tostring(element, encoding="us-ascii", method="xml", *,\ +.. function:: tostring(element, encoding="us-ascii", method="xml", *, \ short_empty_elements=True) Generates a string representation of an XML element, including all @@ -443,7 +443,7 @@ Functions The *short_empty_elements* parameter. -.. function:: tostringlist(element, encoding="us-ascii", method="xml", *,\ +.. function:: tostringlist(element, encoding="us-ascii", method="xml", *, \ short_empty_elements=True) Generates a string representation of an XML element, including all @@ -751,8 +751,8 @@ ElementTree Objects section root element. - .. method:: write(file, encoding="us-ascii", xml_declaration=None,\ - default_namespace=None, method="xml", *,\ + .. method:: write(file, encoding="us-ascii", xml_declaration=None, \ + default_namespace=None, method="xml", *, \ short_empty_elements=True) Writes the element tree to a file, as XML. *file* is a file name, or a @@ -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 |