fix skipping of empty text nodes in rapidxml parser (matches libxml2) - closes #2253

This commit is contained in:
Dane Springmeyer 2014-05-23 10:27:37 -07:00
parent 6ef7b21107
commit 6610fcc297
2 changed files with 19 additions and 1 deletions

View file

@ -141,7 +141,10 @@ private:
case rapidxml::node_data: case rapidxml::node_data:
case rapidxml::node_cdata: case rapidxml::node_cdata:
{ {
node.add_child(cur_node->value(), 0, true); if (cur_node->value_size() > 0) // Don't add empty text nodes
{
node.add_child(cur_node->value(), 0, true);
}
} }
break; break;
default: default:

View file

@ -0,0 +1,15 @@
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="steelblue" minimum-version="0.7.2">
<Style name="labels">
<Rule>
<TextSymbolizer face-name="DejaVu Sans Book"></TextSymbolizer>
<TextSymbolizer face-name="DejaVu Sans Book">''</TextSymbolizer>
<TextSymbolizer face-name="DejaVu Sans Book"><![CDATA[]]></TextSymbolizer>
</Rule>
</Style>
<Layer name="point" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>labels</StyleName>
</Layer>
</Map>