18 const std::string& toplevel_tag,
19 std::stringstream& prj_stream)
27 read_xml(prj_stream, ptree,
28 boost::property_tree::xml_parser::no_comments |
29 boost::property_tree::xml_parser::trim_whitespace);
31 catch (boost::property_tree::xml_parser_error
const& e)
33 OGS_FATAL(
"Error while parsing XML file `{:s}' at line {:d}: {:s}.",
34 e.filename(), e.line(), e.message());
37 DBUG(
"Project configuration from file '{:s}' read.", filepath);
39 if (
auto opt_child = ptree.get_child_optional(toplevel_tag))
44 return ConfigTree(std::move(*opt_child), filepath, callback, callback);
46 OGS_FATAL(
"Tag <{:s}> has not been found in file `{:s}'.", toplevel_tag,