Tricia<br>
<br>
We have just finished implementing a system like this to get CGI
version talking with .NET - simple but very powerful especially with
the template replacement options introduced in v4 for the CGI URL
parameters.<br><br>
In essence we take the output into a XML template that is built in a
fashion to hold all possible output parameters from each execution of
the CGI (mode=browse) - this is at my office (it is mdnight here in the
UK) but I will try to remember to send to you tomorrow.&nbsp; We simply
load this in .NET and and have an 'state' variable holding this between
execution.<br>
<br>
With mode=query (or nquery) we build XML templates per layer.&nbsp;
These are then streamed back from an execution and then are loaded into
a .NET datatable - we can then easily manipulate, sort, delete records
etc.&nbsp; The format we've used is as follows:<br>
<br>
&lt;row&gt;<br>
&nbsp; &lt;fieldname1&gt;[fieldname1]&lt;/fieldname1&gt;<br>
&nbsp; &lt;fieldname2&gt;[fieldname2]&lt;/fieldname2&gt;<br>
&nbsp; &lt;fieldname3&gt;[fieldname3]&lt;/fieldname3&gt;<br>
&lt;/row&gt;<br>
<br>
When MapServer parses this file it replaces the [fieldname1] values with the attribute information.<br>
<br>
There may be a few on the list who wonder why we have gone about it
this way.&nbsp; We have an existing .NET web application that runs on
large vendor software and needed to look at addressing some needs for
our customers who need more flexible environment.&nbsp; We didn't opt
for MapScript in c# at present as we investigated and it appeared to
have some memory issues.&nbsp; The great thing with MapServer CGI is
that it is totally stateless, executes in fractions of a second (we
access over 1 GB of MapInfo files with no problem) and in some cases is
actually faster than the vendor software.<br>
<br>
If anyone wants any further information or ode then just let us know<br>
<br>
Cheers<br>
mike<br>
<br><div><span class="gmail_quote">On 03/11/05, <b class="gmail_sendername">Tricia Williams</b> &lt;<a href="mailto:pgwillia@student.cs.uwaterloo.ca">pgwillia@student.cs.uwaterloo.ca</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi List,<br><br>&nbsp;&nbsp; I was wondering if it is possible to use an xml template instead of a<br>html template to handle nquery results?&nbsp;&nbsp;I have tried experimenting but<br>the results are not recognized as xml.<br><br>&nbsp;&nbsp; My header contains:
<br><br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;result&gt;<br><br>&nbsp;&nbsp; My template contains:<br><br>&lt;place&gt;<br>&nbsp;&nbsp;...<br>&lt;/place&gt;<br><br>&nbsp;&nbsp; My footer contains:<br><br>&lt;/results&gt;
<br><br>&nbsp;&nbsp; Any advice or guidance would be much appreciated.<br><br>Cheers,<br>Tricia<br></blockquote></div><br>