diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py index f17578baac9..4bb4ef49ff1 100644 --- a/Lib/xml/dom/minidom.py +++ b/Lib/xml/dom/minidom.py @@ -1278,15 +1278,15 @@ class DocumentType(Identified, Childless, Node): writer.write("\n") + writer.write(">"+newl) class Entity(Identified, Node): attributes = None @@ -1739,9 +1739,9 @@ class Document(Node, DocumentLS): def writexml(self, writer, indent="", addindent="", newl="", encoding = None): if encoding is None: - writer.write('\n') + writer.write(''+newl) else: - writer.write('\n' % encoding) + writer.write('%s' % (encoding, newl)) for node in self.childNodes: node.writexml(writer, indent, addindent, newl)