From 98fc0ed106efe44be6d8483af3d8d66321fa4190 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Fri, 9 Jan 2015 15:41:26 +0100 Subject: changed XML prolog handling. --- src/core/XML.cpp | 1 - src/core/XML.hpp | 10 +++++----- src/plugins/html/DemoOutput.cpp | 5 +---- 3 files changed, 6 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/core/XML.cpp b/src/core/XML.cpp index affa75f..9cfb5dc 100644 --- a/src/core/XML.cpp +++ b/src/core/XML.cpp @@ -6,7 +6,6 @@ namespace xml { void Node::serialize(std::ostream &out, const std::string &doctype) { - out << "\n"; if (doctype != "") { out << doctype << "\n"; } diff --git a/src/core/XML.hpp b/src/core/XML.hpp index 25c8dae..e55ecba 100644 --- a/src/core/XML.hpp +++ b/src/core/XML.hpp @@ -68,17 +68,17 @@ public: : Managed(mgr), parent(acquire(parent)){}; /** - * This method writes an XML prolog and the XML representing the current + * This method writes an XML doctype and the XML representing the current * node, including all children, to the given output stream. * @param out is the output stream the serialized data shall be * written to. - * @param doctype enables you to add a prefix after the XML prolog - * specifying the doctype. + * @param doctype enables you to add a prefix specifying the doctype. */ - void serialize(std::ostream &out, const std::string &doctype = ""); + void serialize(std::ostream &out, + const std::string &doctype = ""); /** * This method just writes the XML representation of this node to the - * output stream, without the XML prolog. + * output stream. * * @param out the output stream the serialized data shall be written * to. diff --git a/src/plugins/html/DemoOutput.cpp b/src/plugins/html/DemoOutput.cpp index 5413b1f..296a493 100644 --- a/src/plugins/html/DemoOutput.cpp +++ b/src/plugins/html/DemoOutput.cpp @@ -78,10 +78,7 @@ void DemoHTMLTransformer::writeHTML(Handle doc, body->addChild(book); // After the content has been transformed, we serialize it. - html->serialize( - out, - ""); + html->serialize(out, ""); } /** -- cgit v1.2.3