From e79f13df1fbb58f0a2d16ce25873fd57224eb814 Mon Sep 17 00:00:00 2001 From: Hermann Kraus Date: Thu, 23 Feb 2012 18:06:12 +0100 Subject: [PATCH] Add debug helper for XML. --- include/mapnik/internal/dump_xml.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 include/mapnik/internal/dump_xml.hpp diff --git a/include/mapnik/internal/dump_xml.hpp b/include/mapnik/internal/dump_xml.hpp new file mode 100644 index 000000000..022591f7a --- /dev/null +++ b/include/mapnik/internal/dump_xml.hpp @@ -0,0 +1,27 @@ +#ifndef DUMP_XML_HPP +#define DUMP_XML_HPP +#include + +/* Debug dump ptree XML representation. +*/ +void dump_xml(boost::property_tree::ptree const& xml, unsigned level=0) +{ + std::string indent; + int i; + for (i=0; ifirst << "]" << "\n"; + dump_xml(itr->second, level+1); + std::cout << indent << "[/" << itr->first << "]" << "\n"; + } +} + + +#endif // DUMP_XML_HPP