https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: cd57df9e5555c8def02580e076a9847563bbe8c2 authored by Lars Bilke on 24 February 2021, 19:53:48 UTC
Merge branch 'ci-manual-large' into 'master'
Tip revision: cd57df9
TestTools.cpp
/**
 * \copyright
 * Copyright (c) 2012-2021, 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 <boost/property_tree/xml_parser.hpp>

#include "Tests/TestTools.h"

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