version 0.3.31
[fms.git] / include / ifmsxmldocument.h
index ae3f4e6..0a0ddc1 100644 (file)
@@ -209,13 +209,20 @@ protected:
                return returntext;\r
        }\r
 \r
-       const std::string GenerateXML(Poco::AutoPtr<Poco::XML::Document> doc)\r
+       const std::string GenerateXML(Poco::AutoPtr<Poco::XML::Document> doc, const bool prettyprint=true)\r
        {\r
                std::ostringstream str;\r
                if(doc)\r
                {\r
                        Poco::XML::DOMWriter dr;\r
-                       dr.setOptions(Poco::XML::XMLWriter::WRITE_XML_DECLARATION | Poco::XML::XMLWriter::PRETTY_PRINT);\r
+                       if(prettyprint==true)\r
+                       {\r
+                               dr.setOptions(Poco::XML::XMLWriter::WRITE_XML_DECLARATION | Poco::XML::XMLWriter::PRETTY_PRINT);\r
+                       }\r
+                       else\r
+                       {\r
+                               dr.setOptions(Poco::XML::XMLWriter::WRITE_XML_DECLARATION);\r
+                       }\r
                        dr.setNewLine(Poco::XML::XMLWriter::NEWLINE_CRLF);\r
                        dr.writeNode(str,doc);\r
                }\r