Skip to content

Commit 18e23f2

Browse files
miss-islingtonWindsooon
authored andcommitted
bpo-18911: clarify that the minidom XML writer receives texts but not bytes (GH-13718)
(cherry picked from commit 5ac0b98) Co-authored-by: Windson yang <wiwindson@outlook.com>
1 parent 464c1ec commit 18e23f2

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

Doc/library/xml.dom.minidom.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,12 @@ module documentation. This section lists the differences between the API and
134134

135135
.. method:: Node.writexml(writer, indent="", addindent="", newl="")
136136

137-
Write XML to the writer object. The writer should have a :meth:`write` method
138-
which matches that of the file object interface. The *indent* parameter is the
139-
indentation of the current node. The *addindent* parameter is the incremental
140-
indentation to use for subnodes of the current one. The *newl* parameter
141-
specifies the string to use to terminate newlines.
137+
Write XML to the writer object. The writer receives texts but not bytes as input,
138+
it should have a :meth:`write` method which matches that of the file object
139+
interface. The *indent* parameter is the indentation of the current node.
140+
The *addindent* parameter is the incremental indentation to use for subnodes
141+
of the current one. The *newl* parameter specifies the string to use to
142+
terminate newlines.
142143

143144
For the :class:`Document` node, an additional keyword argument *encoding* can
144145
be used to specify the encoding field of the XML header.

0 commit comments

Comments
 (0)