I am using the WMGetFeatureInfo control in OpenLayers to select items from my layers and return GML.

I use this to get an attribute from the GML;

 var val = evt.features[0].attributes.UID;
//Where evt is the object returned from "getfeatureinfo" event.

But the GML also contains a whole bunch of other good stuff in between the " wfs:FeatureCollection", and "gml:featureMembers" sections.

How can I iterate through the wfs:FeatureCollection or gml:featureMembers because I cannot figure out the syntax.

Also, would it be easier to parse the info I need from the XML that's returned?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.