Extract attributes wrapped in CDATA, by adding an additional nodeType. (See

#1007) This closes the last remaining bug for 2.5RC3 -- I'll release that in
the morning unless anything new pops up.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4429 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-09-21 01:14:25 +00:00
parent 640b62adc8
commit 85e9e30908
4 changed files with 16 additions and 5 deletions

View File

@@ -326,7 +326,7 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
grandchildren = child.childNodes;
if(grandchildren.length == 1) {
grandchild = grandchildren[0];
if(grandchild.nodeType == 3) {
if(grandchild.nodeType == 3 || grandchild.nodeType == 4) {
name = (child.prefix) ?
child.nodeName.split(":")[1] :
child.nodeName;
@@ -638,4 +638,4 @@ OpenLayers.Format.KML = OpenLayers.Class(OpenLayers.Format.XML, {
},
CLASS_NAME: "OpenLayers.Format.KML"
});
});