diff options
author | Roland Reichwein <mail@reichwein.it> | 2024-05-09 12:00:47 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2024-05-09 12:00:47 +0200 |
commit | e4fa505e2ce41b753c132c00f8c79290ee8f5936 (patch) | |
tree | b4520c9bc558da6436b698437c25304beae6b6d4 | |
parent | 20a2aa6070d6e7e6a1bd9e0bb2e85eca10543bbc (diff) |
Added missing xml.h
-rw-r--r-- | xml.cpp | 9 | ||||
-rw-r--r-- | xml.h | 10 |
2 files changed, 19 insertions, 0 deletions
@@ -0,0 +1,9 @@ +#include "xml.h" + +#include <boost/property_tree/xml_parser.hpp> + +std::string Reichwein::XML::plain_xml(const boost::property_tree::ptree& ptree) { + std::ostringstream oss; + boost::property_tree::xml_parser::write_xml_element(oss, {}, ptree, -1, boost::property_tree::xml_writer_settings<boost::property_tree::ptree::key_type>{}); + return oss.str(); +} @@ -0,0 +1,10 @@ +#pragma once + +#include <string> +#include <boost/property_tree/ptree.hpp> + +#define EXPORT __attribute__((visibility("default"))) + +namespace Reichwein::XML { + EXPORT std::string plain_xml(const boost::property_tree::ptree& ptree); +} |