<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16764" name=GENERATOR>

<DIV><FONT face=Arial size=2>I have added it to my sandbox, opened a ticket and 
submitted patch.</FONT></DIV>
<DIV><FONT face=Arial size=2>The patch has been reviewed and modified and you 
can see the current progress of it at:</FONT></DIV>
<DIV><A href="http://trac.openlayers.org/ticket/1812" target="_top" rel="nofollow">http://trac.openlayers.org/ticket/1812</A></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>glad to know that others are in someway interested 
in this.</FONT></DIV>
<DIV><FONT face=Arial size=2>Matt Priour</FONT>&nbsp;</DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1834153&i=0" target="_top" rel="nofollow">ml-user+64477-1516779769@...</a> </DIV>
<DIV><B>Sent:</B> Thursday, December 25, 2008 10:43 PM</DIV>
<DIV><B>To:</B> <a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1834153&i=1" target="_top" rel="nofollow">mpriour@...</a> </DIV>
<DIV><B>Subject:</B> Re: Difficulties with GetFeatureInfo</DIV></DIV></DIV>
<DIV><BR></DIV>Matt, i had never tried Format.GML with GetFeatureInfo responses. 
And <BR>indeed that'd be great to have support for this. Do you plan to 
<BR>contribute your work for integration into OpenLayers? Thanks. Eric 
<BR><BR>2008/7/9, mpriour &lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1834153&i=2" target="_top" rel="nofollow">mpriour@...</a>&gt;: 
<DIV class=shrinkable-quote><div class='shrinkable-quote'><BR>&gt; <BR>&gt; I was actually struggling with 
this same problem this past month. <BR>&gt; You should use: <BR>&gt; <BR>&gt; 
var xmlResponse = new OpenLayers.Format.XML().read(response.responseText); 
<BR>&gt; <BR>&gt; this will convert the text into a valid xml object. <BR>&gt; 
>From there you can do whatever you want to it. <BR>&gt; <BR>&gt; I am writing 
some convience methods that extend OpenLayers.Format.GML to <BR>&gt; parse the 
GML GetFeatureInfo response into predictable js objects. The <BR>&gt; current 
methods for Format.GML &amp; Format.WFS are not designed to correctly <BR>&gt; 
parse the entire GML GetFeatureInfo response. They can parse some geometry 
<BR>&gt; or features from portions of the response. <BR>&gt; <BR>&gt; Matt 
Priour <BR>&gt; Kestrel Computer Consulting <BR>&gt; www.kestrelcompter.com - 
homepage <BR>&gt; priour.wordpress.com - blog <BR>&gt; <BR>&gt; <BR>&gt; Eric 
Lemoine-3 wrote: <BR>&gt;&gt; <BR>&gt;&gt; Hi. Have you tried using 
OpenLayers.Format.GML for de-serializing the <BR>&gt;&gt; response text into 
feature objects? Eric <BR>&gt;&gt; <BR>&gt;&gt; 2008/7/8, Rick Wayne &lt;<A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=1829677&amp;i=1" target=_top rel="nofollow">fewayne@...</A>&gt;: <BR>&gt;&gt;&gt; Hullo all, 
<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; I'm using OpenLayers and GeoServer, and am 
having some trouble with <BR>&gt;&gt;&gt; getting XML data out of 
GetFeatureInfo. If I ask GeoServer for <BR>&gt;&gt;&gt; INFO_FORMAT of 
application/vnd.ogc.gml, I get a response back, and it <BR>&gt;&gt;&gt; has the 
data I desire. But I cannot access those data as XML. I have <BR>&gt;&gt;&gt; to 
get them via responseText and parse that looking for angle brackets 
<BR>&gt;&gt;&gt; and the like, which is all very boring, not to say fragile as a 
dried <BR>&gt;&gt;&gt; leaf. <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; Of course, I 
should be able to make use of the responseXML property, <BR>&gt;&gt;&gt; but 
that obstinately persists in being NULL, even when the text <BR>&gt;&gt;&gt; 
response is fine. In fact, the text response is perfectly good XML. As 
<BR>&gt;&gt;&gt; a big honkin' string. <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; I'm 
using GeoServer 1.5.3 and, er, whichever OL version came with <BR>&gt;&gt;&gt; 
that. :-) <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; Below are the relevant calls. If 
anyone can assuage my ignorance, good <BR>&gt;&gt;&gt; cheer to them! 
<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; TIA, <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; Rick 
Wayne <BR>&gt;&gt;&gt; UW Soil Science <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp;[...] <BR>&gt;&gt;&gt; map.events.register('click', 
map, function (e) { <BR>&gt;&gt;&gt; var url = 
&nbsp;map.baseLayer.getFullRequestString({ <BR>&gt;&gt;&gt; REQUEST: 
"GetFeatureInfo", <BR>&gt;&gt;&gt; EXCEPTIONS: "application/vnd.ogc.se_xml", 
<BR>&gt;&gt;&gt; BBOX: map.getExtent().toBBOX(), <BR>&gt;&gt;&gt; X: e.xy.x, 
<BR>&gt;&gt;&gt; Y: e.xy.y, <BR>&gt;&gt;&gt; INFO_FORMAT: 
'application/vnd.ogc.gml', <BR>&gt;&gt;&gt; // INFO_FORMAT: 'text/plain', 
<BR>&gt;&gt;&gt; QUERY_LAYERS: map.baseLayer.params.LAYERS, <BR>&gt;&gt;&gt; 
FEATURE_COUNT: 1, <BR>&gt;&gt;&gt; srs: 'EPSG:26916', <BR>&gt;&gt;&gt; styles: 
'', <BR>&gt;&gt;&gt; layers: 'mmas:civil', <BR>&gt;&gt;&gt; WIDTH: map.size.w, 
<BR>&gt;&gt;&gt; HEIGHT: map.size.h}, <BR>&gt;&gt;&gt; "/geoserver/wms" 
<BR>&gt;&gt;&gt; &nbsp;); <BR>&gt;&gt;&gt; OpenLayers.loadURL(url, '', this, 
zoomToFeature, zoomToFeature); <BR>&gt;&gt;&gt; Event.stop(e); <BR>&gt;&gt;&gt; 
}); <BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; function zoomToFeature(response) { 
<BR>&gt;&gt;&gt; // lines = response.responseText.split('\n'); <BR>&gt;&gt;&gt; 
var txt; <BR>&gt;&gt;&gt; var tag; <BR>&gt;&gt;&gt; var coord_index; 
<BR>&gt;&gt;&gt; var rest; <BR>&gt;&gt;&gt; var coord_text; <BR>&gt;&gt;&gt; var 
coords; <BR>&gt;&gt;&gt; var coord_pairs,ll,ur; <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; txt = response.responseText; // here should be xml = 
<BR>&gt;&gt;&gt; response.responseXML; <BR>&gt;&gt;&gt; tag = 'gml:coordinates 
decimal="." cs="," ts=" "&gt;'; <BR>&gt;&gt;&gt; coord_index = txt.indexOf(tag); 
<BR>&gt;&gt;&gt; rest = txt.substr(coord_index + tag.length); <BR>&gt;&gt;&gt; 
end_coord_index = rest.indexOf('&lt;'); <BR>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp;// And so on, too ugly to reveal the rest! <BR>&gt;&gt;&gt; 
<BR>&gt;&gt;&gt; <BR>&gt;&gt;&gt; 
_______________________________________________ <BR>&gt;&gt;&gt; Users mailing 
list <BR>&gt;&gt;&gt; <A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=1829677&amp;i=2" target=_top rel="nofollow">Users@...</A> <BR>&gt;&gt;&gt; <A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>&gt;&gt;&gt; 
<BR>&gt;&gt; _______________________________________________ <BR>&gt;&gt; Users 
mailing list <BR>&gt;&gt; <A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=1829677&amp;i=3" target=_top rel="nofollow">Users@...</A> <BR>&gt;&gt; <A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>&gt;&gt; 
<BR>&gt;&gt; <BR>&gt; <BR>&gt; -- <BR>&gt; View this message in context: 
<BR>&gt; <A href="http://www.nabble.com/Difficulties-with-GetFeatureInfo-tp18347813p18353488.html" target=_top rel="nofollow">http://www.nabble.com/Difficulties-with-GetFeatureInfo-tp18347813p18353488.html</A><BR>&gt; 
Sent from the OpenLayers Users mailing list archive at Nabble.com. <BR>&gt; 
<BR>&gt; _______________________________________________ <BR>&gt; Users mailing 
list <BR>&gt; <A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=1829677&amp;i=4" target=_top rel="nofollow">Users@...</A> <BR>&gt; <A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>&gt; 
</DIV>_______________________________________________ </div>Users mailing list 
<BR><A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&amp;node=1829677&amp;i=5" target=_top rel="nofollow">Users@...</A> <BR><A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>

<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/Difficulties-with-GetFeatureInfo-tp1829674p1834153.html">Re: Difficulties with GetFeatureInfo</a><br>
Sent from the <a href="http://n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br>