Hi!<br>Am trying to save results from a WMS GetFeature request as GML and attempting to add it as GML layer.<br>The request function is as below<br><br>function getGML(){<br><br>                    var params = {<br>                        SERVICE: &quot;WFS&quot;,<br>
                        VERSION: &quot;1.0.0&quot;,<br>                        REQUEST: &quot;GetFeature&quot;,<br>                        typeName: &quot;provinces&quot;,<br>                        Filter: &quot;&lt;Filter&gt;&lt;PropertyIsEqualTo&gt;&lt;PropertyName&gt;prov_name&lt;/PropertyName&gt;&lt;Literal&gt;Nairobi&lt;/Literal&gt;&lt;/PropertyIsEqualTo&gt;&lt;/Filter&gt;&quot;,<br>
                        outputFormat: &quot;GML2&quot;<br>                        };<br><br>                    OpenLayers.loadURL(&quot;<a href="http://mapdemo.net/cgi-bin/mapserv?map=/var/www/mapdemo/project/kenya2.map&amp;">http://mapdemo.net/cgi-bin/mapserv?map=/var/www/mapdemo/project/kenya2.map&amp;</a>&quot;, params, this, setGML, setGML);<br>
                    OpenLayers.Event.stop(e);<br>                    <br>                }<br><br>while the function to add the returned GML is as below<br><br>function setGML(response){<br>                <br>                                <br>
                /*                <br>                if (response.responseXML == &#39;text/xml&#39;) {<br>                    alert(this.responseXML);<br>                } else if (response.responseXML == &#39;text/plain&#39;) {<br>
                    alert(this.responseText);<br>                } else {<br>                    alert(&#39;unknown content type&#39;);<br>                } <br>               */ <br><br>               var gmlayer = response.responseXML;<br>
<br>                mapPanel.map.addLayer(new OpenLayers.Layer.GML(&quot;GML&quot;, gmlayer)); */<br>                <br>}<br><br><br>running the two functions gives an &#39;Error in loading GML file [object XMLDocument]&#39; alert<br>
while even the commented code section gives &#39;unknown content type&#39; alert.<br>My setup includes MapServer(WFS enabled), OpenLayers and GeoExt / ExtJS.<br>Any tips,pointers are highly appreciated.<br><br>Regards,<br>
Allan Maungu.<br>