https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: d8b330d67a2f62b174dde1c77070d4cf3c38578f authored by Dmitry Yu. Naumov on 17 July 2023, 09:31:16 UTC
Merge branch 'SmallFixes' into 'master'
Tip revision: d8b330d
TestTools.cpp
/**
 * \file
 * \copyright
 * Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 */

#include "Tests/TestTools.h"

#include <boost/property_tree/xml_parser.hpp>

namespace Tests
{
boost::property_tree::ptree readXml(const char xml[])
{
    boost::property_tree::ptree ptree;
    std::istringstream xml_str(xml);
    boost::property_tree::read_xml(
        xml_str, ptree,
        boost::property_tree::xml_parser::no_comments |
            boost::property_tree::xml_parser::trim_whitespace);
    return ptree;
}

}  // namespace Tests
back to top