[OpenLayers-Users] GML and GetFeatureInfo
Spencer, Andrew
Andrew.Spencer at nntt.gov.au
Mon Nov 3 22:32:59 EST 2008
Hi All,
I've seen this issue raised several times, the response has often not
solved the issue as far as I can tell. I believe Matt Priour, one of the
contributors here, was looking at a more elegant solution, but I don't
know what the status of that is (Matt???). However, my issue is that we
use MapInfo MapXtreme as our WMS server. GetFeatureInfo requests are
returned as XML/GML, but I'm not able to parse it into a formatted
response. Using code from the sample project, attribute info is
displayed in one long string, so I'd like to get in there and apply
headings and line breaks etc. The xml parsing example can be made to
pull out gml:name and gml:metaDataProperty, but I can't get to anything
else. The XML looks a bit like this:
<?xml version="1.0" encoding="utf-8"?>
<FeatureCollectionList xmlns:gml="http://www.opengis.net/gml"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.mapinfo.com/mxp">
<FeatureCollection xmlns:mxp="http://www.mapinfo.com/mxp"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xlink="http://www.w3.org/1999/xlink">
<gml:metaDataProperty>
<mxp:FeatureCollectionMetaData>
<mxp:AttributeDefinitionSet>
<mxp:ValueAttributeDefinition id="Organisation"
name="Organisation" type="mapinfo:type string 100" />
<mxp:ValueAttributeDefinition id="Name" name="Name"
type="mapinfo:type string 40" />
<mxp:ValueAttributeDefinition id="Gazetted"
name="Gazetted" type="mapinfo:type date" />
<mxp:ValueAttributeDefinition id="Effective"
name="Effective" type="mapinfo:type date" />
<mxp:ValueAttributeDefinition id="Comments"
name="Comments" type="mapinfo:type string 120" />
<mxp:ValueAttributeDefinition id="ID" name="ID"
type="mapinfo:type short" />
</mxp:AttributeDefinitionSet>
<mxp:KeyDefinition refs="Organisation Comments" />
</mxp:FeatureCollectionMetaData>
</gml:metaDataProperty>
<gml:name>My Feature Type Name</gml:name>
<gml:boundedBy>
<gml:Null>missing</gml:Null>
</gml:boundedBy>
<mxp:FeatureMembers>
<mxp:Feature>
<mxp:Val ref="Organisation">My Organisation</mxp:Val>
<mxp:Val ref="Name">My Area Name</mxp:Val>
<mxp:Val ref="Effective">My Date</mxp:Val>
<mxp:Val ref="Comments" />No Comments</mxp:Val>
<mxp:Val ref="ID">1000</mxp:Val>
</mxp:Feature>
</mxp:FeatureMembers>
</FeatureCollection>
</FeatureCollectionList>
If anyone has any ideas I'd be eternally grateful!
Cheers
Andrew
If this email has been received in error, please delete all copies
and inform the National Native Title Tribunal by return email or
telephone 1800 640 501.
The Tribunal does not warrant that its email is virus free.
All emails sent to the Tribunal are filtered for viruses and
inappropriate content. Thus your email may not reach the person to
whom it is addressed. Seek confirmation of receipt of your email if you
consider the email important.
More information about the Users
mailing list