+ support load_map_string for all xml parsers

This commit is contained in:
Artem Pavlenko 2009-02-18 00:33:26 +00:00
parent 97a40d7e7e
commit 56b15031d0

View file

@ -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 );