Parsing emtpy attributes in GML as empty strings. Thanks for the patch bartvde. r=bartvde,me (closes #1927)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8824 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-02-04 18:33:13 +00:00
parent a84a9c1144
commit 6f38974fc3
2 changed files with 35 additions and 1 deletions

View File

@@ -325,7 +325,8 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, {
} else {
// Assume attribute elements have one child node and that the child
// is a text node. Otherwise assume it is a geometry node.
if(node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
if(node.childNodes.length == 0 ||
(node.childNodes.length == 1 && node.firstChild.nodeType == 3)) {
if(this.extractAttributes) {
name = "_attribute";
}