[OpenLayers-Dev] problem with GML v2 parser

bartvde at osgis.nl bartvde at osgis.nl
Thu Nov 13 10:45:19 EST 2008

Hi list,

I've got a slight problem with the GML v2 parser when running it over the
attached GML file. What I run into is that obj.attributes is undefined,
but I can't really find an explanation why this is happening ... and
ofcourse it would be good to know why instead of just patching it the way
I did below.

GML/Base.js, readers:

            "_attribute": function(node, obj) {
                var local = node.localName || node.nodeName.split(":").pop();
                var value = this.getChildValue(node);
                if (!obj.attributes) {
                    obj.attributes = {};
                obj.attributes[local] = value;

I've also attached an example to reproduce the error.

obj.attributes is undefined
Line 342


Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20081113/2386784f/GMLparserv2.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kgn.xml
Type: text/xml
Size: 24174 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20081113/2386784f/kgn.xml

More information about the Dev mailing list