X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=include%2Fifmsxmldocument.h;fp=include%2Fifmsxmldocument.h;h=0a0ddc1af5cca6cc31109ec8d00c230d6415a5f2;hp=ae3f4e6c38c469f467b9c695551f2d4a30710138;hb=ed0732b2550c23c05fc9faf925620e87ee6dee12;hpb=59a5414ec47a2932a7802fcd1d98c4d80166564f diff --git a/include/ifmsxmldocument.h b/include/ifmsxmldocument.h index ae3f4e6..0a0ddc1 100644 --- a/include/ifmsxmldocument.h +++ b/include/ifmsxmldocument.h @@ -209,13 +209,20 @@ protected: return returntext; } - const std::string GenerateXML(Poco::AutoPtr doc) + const std::string GenerateXML(Poco::AutoPtr doc, const bool prettyprint=true) { std::ostringstream str; if(doc) { Poco::XML::DOMWriter dr; - dr.setOptions(Poco::XML::XMLWriter::WRITE_XML_DECLARATION | Poco::XML::XMLWriter::PRETTY_PRINT); + if(prettyprint==true) + { + dr.setOptions(Poco::XML::XMLWriter::WRITE_XML_DECLARATION | Poco::XML::XMLWriter::PRETTY_PRINT); + } + else + { + dr.setOptions(Poco::XML::XMLWriter::WRITE_XML_DECLARATION); + } dr.setNewLine(Poco::XML::XMLWriter::NEWLINE_CRLF); dr.writeNode(str,doc); }