From 56b15031d0ae3b949c339afd0afda8d9da2c06e7 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Wed, 18 Feb 2009 00:33:26 +0000 Subject: [PATCH] + support load_map_string for all xml parsers --- src/load_map.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/load_map.cpp b/src/load_map.cpp index b05b580e0..8820c397f 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -118,7 +118,15 @@ namespace mapnik #ifdef HAVE_LIBXML2 read_xml2_string(str, pt); #else - throw config_error( "load_map_string() only supported with libxml2 parser" ); + try + { + std::istringstream s(str); + read_xml(s,pt); + } + catch (const boost::property_tree::xml_parser_error & ex) + { + throw config_error( ex.what() ) ; + } #endif map_parser parser( strict );