<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<pre class="moz-signature" cols="72">Hello,
I am using the WMSGetFeatureInfo funciton to return information about various layers in my OpenLayers web app. I recieve the gml back well enough however, i was wondereing if there is an easy way to format this GML for display in a bubble box or something along those popup lines. I am hoping that I don't have to write a GML parser. Here is my code as it is now:
</pre>
<div class="webkit-line-content" style="box-sizing: border-box;
padding-left: 2px; color: rgb(0, 0, 0); font-family: Consolas,
'Lucida Console', monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 14px; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); ">function identify(){ for (var i = 0; i <
map.layers.length; i++) { test = map.layers[i].name; } info = new
OpenLayers.Control.WMSGetFeatureInfo({ url: url, title: 'Identify
features by clicking', layers: [map.layers[1],map.layers[2]],
queryVisible: true, }); info.events.register("getfeatureinfo",
this, pickInfo); info.infoFormat = 'application/vnd.ogc.gml';
map.addControl(info); info.activate();
}
function pickInfo(e){</div>
<div class="webkit-line-content webkit-breakpoint"
style="box-sizing: border-box; padding-left: 2px; color: rgb(0, 0,
0); font-family: Consolas, 'Lucida Console', monospace; font-size:
12px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 14px; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: pre; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); "> <span
class="webkit-javascript-ident" style="box-sizing: border-box;
color: black; ">alert</span>(<span
class="webkit-javascript-ident" style="box-sizing: border-box;
color: black; ">e</span>.<span class="webkit-javascript-ident"
style="box-sizing: border-box; color: black; ">text</span>);</div>
<div class="webkit-line-content" style="box-sizing: border-box;
padding-left: 2px; color: rgb(0, 0, 0); font-family: Consolas,
'Lucida Console', monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 14px; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); "> <span class="webkit-javascript-ident" style="box-sizing:
border-box; color: black; ">map</span>.<span
class="webkit-javascript-ident" style="box-sizing: border-box;
color: black; ">addPopup</span>(<span
class="webkit-javascript-keyword" style="box-sizing: border-box;
color: rgb(170, 13, 145); ">new</span> <span
class="webkit-javascript-ident" style="box-sizing: border-box;
color: black; ">OpenLayers</span>.<span
class="webkit-javascript-ident" style="box-sizing: border-box;
color: black; ">Popup</span>.<span
class="webkit-javascript-ident" style="box-sizing: border-box;
color: black; ">FramedCloud</span>(</div>
<div class="webkit-line-content" style="box-sizing: border-box;
padding-left: 2px; color: rgb(0, 0, 0); font-family: Consolas,
'Lucida Console', monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 14px; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); "> <span class="webkit-javascript-string"
style="box-sizing: border-box; color: rgb(196, 26, 22); ">"Feature
Info:"</span>, </div>
<div class="webkit-line-content" style="box-sizing: border-box;
padding-left: 2px; color: rgb(0, 0, 0); font-family: Consolas,
'Lucida Console', monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 14px; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); "> <span class="webkit-javascript-ident" style="box-sizing:
border-box; color: black; ">map</span>.<span
class="webkit-javascript-ident" style="box-sizing: border-box;
color: black; ">getLonLatFromPixel</span>(<span
class="webkit-javascript-ident" style="box-sizing: border-box;
color: black; ">e</span>.<span class="webkit-javascript-ident"
style="box-sizing: border-box; color: black; ">xy</span>),</div>
<div class="webkit-line-content" style="box-sizing: border-box;
padding-left: 2px; color: rgb(0, 0, 0); font-family: Consolas,
'Lucida Console', monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 14px; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); "> <span class="webkit-javascript-keyword"
style="box-sizing: border-box; color: rgb(170, 13, 145); ">null</span>,</div>
<div class="webkit-line-content" style="box-sizing: border-box;
padding-left: 2px; color: rgb(0, 0, 0); font-family: Consolas,
'Lucida Console', monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 14px; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); "> <span class="webkit-javascript-ident" style="box-sizing:
border-box; color: black; ">e</span>.<span
class="webkit-javascript-ident" style="box-sizing: border-box;
color: black; ">text</span>,</div>
<div class="webkit-line-content" style="box-sizing: border-box;
padding-left: 2px; color: rgb(0, 0, 0); font-family: Consolas,
'Lucida Console', monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 14px; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); "> <span class="webkit-javascript-keyword"
style="box-sizing: border-box; color: rgb(170, 13, 145); ">null</span>,</div>
<div class="webkit-line-content" style="box-sizing: border-box;
padding-left: 2px; color: rgb(0, 0, 0); font-family: Consolas,
'Lucida Console', monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 14px; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); "> <span class="webkit-javascript-keyword"
style="box-sizing: border-box; color: rgb(170, 13, 145); ">true</span></div>
<div class="webkit-line-content" style="box-sizing: border-box;
padding-left: 2px; color: rgb(0, 0, 0); font-family: Consolas,
'Lucida Console', monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 14px; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); "> ));</div>
<div class="webkit-line-content" style="box-sizing: border-box;
padding-left: 2px; color: rgb(0, 0, 0); font-family: Consolas,
'Lucida Console', monospace; font-size: 12px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: 14px; orphans: 2; text-align: start; text-indent:
0px; text-transform: none; white-space: pre; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); ">}</div>
<br class="Apple-interchange-newline">
<pre class="moz-signature" cols="72">Cheers,
Derek
</pre>
</body>
</html>