diff --git a/lib/OpenLayers/Format/WFS.js b/lib/OpenLayers/Format/WFS.js index 1a74fe648d..3079a6fcef 100644 --- a/lib/OpenLayers/Format/WFS.js +++ b/lib/OpenLayers/Format/WFS.js @@ -76,7 +76,8 @@ OpenLayers.Format.WFS = OpenLayers.Class(OpenLayers.Format.GML, { break; } } - return transaction; + + return OpenLayers.Format.XML.prototype.write.apply(this,[transaction]); }, /** @@ -92,7 +93,7 @@ OpenLayers.Format.WFS = OpenLayers.Class(OpenLayers.Format.GML, { var featureContainer = this.createElementNS(this.featureNS, "feature:" + this.featureName); featureContainer.appendChild(geomContainer); for(var attr in feature.attributes) { - var attrText = document.createTextNode(feature.attributes[attr]); + var attrText = this.createTextNode(feature.attributes[attr]); var nodename = attr; if (attr.search(":") != -1) { nodename = attr.split(":")[1]; @@ -132,7 +133,7 @@ OpenLayers.Format.WFS = OpenLayers.Class(OpenLayers.Format.GML, { var propertyNode = this.createElementNS(this.wfsns, 'wfs:Property'); var nameNode = this.createElementNS(this.wfsns, 'wfs:Name'); - var txtNode = document.createTextNode(this.geometryName); + var txtNode = this.createTextNode(this.geometryName); nameNode.appendChild(txtNode); propertyNode.appendChild(nameNode);