From 7f514aadac9ec4a22095d60482929b495cfa604f Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <dmitri.naumov@ufz.de> Date: Mon, 9 Feb 2015 16:53:27 +0100 Subject: [PATCH] Ignore XML comments in input files. Only those, which are read by the read_xml() function. --- Applications/CLI/ogs.cpp | 3 ++- FileIO/XmlIO/Boost/BoostXmlGmlInterface.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Applications/CLI/ogs.cpp b/Applications/CLI/ogs.cpp index 6c57df810cd..57b95043415 100644 --- a/Applications/CLI/ogs.cpp +++ b/Applications/CLI/ogs.cpp @@ -64,7 +64,8 @@ int main(int argc, char *argv[]) // Project's configuration ConfigTree project_config; - read_xml(project_arg.getValue(), project_config, false); + read_xml(project_arg.getValue(), project_config, + boost::property_tree::xml_parser::no_comments); DBUG("Project configuration from file \'%s\' read.", project_arg.getValue().c_str()); diff --git a/FileIO/XmlIO/Boost/BoostXmlGmlInterface.cpp b/FileIO/XmlIO/Boost/BoostXmlGmlInterface.cpp index 0f24d4d0eef..e4717bab6b8 100644 --- a/FileIO/XmlIO/Boost/BoostXmlGmlInterface.cpp +++ b/FileIO/XmlIO/Boost/BoostXmlGmlInterface.cpp @@ -53,7 +53,7 @@ bool BoostXmlGmlInterface::readFile(const std::string &fname) // build DOM tree using boost::property_tree::ptree; ptree doc; - read_xml(in, doc); + read_xml(in, doc, boost::property_tree::xml_parser::no_comments); if (!isGmlFile(doc)) -- GitLab