+ support load_map_string for all xml parsers
This commit is contained in:
parent
97a40d7e7e
commit
56b15031d0
1 changed files with 9 additions and 1 deletions
|
@ -118,7 +118,15 @@ namespace mapnik
|
||||||
#ifdef HAVE_LIBXML2
|
#ifdef HAVE_LIBXML2
|
||||||
read_xml2_string(str, pt);
|
read_xml2_string(str, pt);
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
map_parser parser( strict );
|
map_parser parser( strict );
|
||||||
|
|
Loading…
Add table
Reference in a new issue