diff --git a/src/libutil/xml-writer.cc b/src/libutil/xml-writer.cc index 7d698bf6ae..16dfb6ddc9 100644 --- a/src/libutil/xml-writer.cc +++ b/src/libutil/xml-writer.cc @@ -9,7 +9,7 @@ namespace nix { XMLWriter::XMLWriter(bool indent, std::ostream & output) : output(output), indent(indent) { - output << "\n"; + output << "" << std::endl; closed = false; } @@ -43,7 +43,7 @@ void XMLWriter::openElement(const string & name, output << "<" << name; writeAttrs(attrs); output << ">"; - if (indent) output << "\n"; + if (indent) output << std::endl; pendingElems.push_back(name); } @@ -53,7 +53,7 @@ void XMLWriter::closeElement() assert(!pendingElems.empty()); indent_(pendingElems.size() - 1); output << ""; - if (indent) output << "\n"; + if (indent) output << std::endl; pendingElems.pop_back(); if (pendingElems.empty()) closed = true; } @@ -67,7 +67,7 @@ void XMLWriter::writeEmptyElement(const string & name, output << "<" << name; writeAttrs(attrs); output << " />"; - if (indent) output << "\n"; + if (indent) output << std::endl; }