25 const std::string& toplevel_tag,
26 std::stringstream& prj_stream)
34 read_xml(prj_stream, ptree,
35 boost::property_tree::xml_parser::no_comments |
36 boost::property_tree::xml_parser::trim_whitespace);
38 catch (boost::property_tree::xml_parser_error
const& e)
40 OGS_FATAL(
"Error while parsing XML file `{:s}' at line {:d}: {:s}.",
41 e.filename(), e.line(), e.message());
44 DBUG(
"Project configuration from file '{:s}' read.", filepath);
46 if (
auto opt_child = ptree.get_child_optional(toplevel_tag))
51 return ConfigTree(std::move(*opt_child), filepath, callback, callback);
53 OGS_FATAL(
"Tag <{:s}> has not been found in file `{:s}'.", toplevel_tag,