A
Adam Sandler
Hello,
Before I begin, here's some background to the problem. I'm working on
a web app which deals with maps. Via a browser, the users can zoom in,
zoom out, and pan around a map of their geographic region. The users
can also click a button called "identify". When they do this the mouse
pointer changes to a crosshair and when they click on the map, the
polygon under the cursor is captured and passed in a query to the
database... what is returned is information about that "identified"
point
The results returned are in a XML format. Some 3rd party software I'm
using is the broker here and that product returns all queries as XML...
I cannot change it. If you're curious, here's a sample of what the
results look like:
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
<RESPONSE>
<FEATURES>
<FEATURE>
<ENVELOPE minx="-104.812676033658" miny="38.8389470054157"
maxx="-104.81244896185" maxy="38.839049932579" />
<FIELDS>
<FIELD name="FID" value="152474" />
<FIELD name="SHAPE_AREA" value="2008.734375" />
<FIELD name="SHAPE_LEN" value="189.714570418" />
</FIELDS>
</FEATURE>
</FEATURES>
</RESPONSE>
</ARCXML>
For display, I was thinking of throwing these results into a
gridview... here's what I've written:
Sub showXML(ByVal s As String)
Dim ds As New DataSet
Dim gv As New GridView
Dim xr As System.Xml.XmlReader =
System.Xml.XmlReader.Create(New System.IO.StringReader(s))
ds.ReadXml(xr)
gv.DataSource = ds
gv.DataBind()
Me.GridViewPlaceHolder.Controls.Add(gv)
End Sub
And at runtime, this is what the gridview looks like:
ARCXML_Id version
0 1.1
hmmmm... I was under the impression one could throw XML into a gridview
and the component knew how to handle it automatically... i.e., the tags
describing the data automatically became column headings and the values
automatically became rows??? Also, I don't have a tag "ARCXML_Id"...
where did the "_Id" get appended to the ARCXML?
Why does only the first line of the results make it into the gridview?
How can I get all the XML into the gridview? Suggestions as to where
I'm going wrong with my implementation are greatly appreciated.
Thanks!
Before I begin, here's some background to the problem. I'm working on
a web app which deals with maps. Via a browser, the users can zoom in,
zoom out, and pan around a map of their geographic region. The users
can also click a button called "identify". When they do this the mouse
pointer changes to a crosshair and when they click on the map, the
polygon under the cursor is captured and passed in a query to the
database... what is returned is information about that "identified"
point
The results returned are in a XML format. Some 3rd party software I'm
using is the broker here and that product returns all queries as XML...
I cannot change it. If you're curious, here's a sample of what the
results look like:
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
<RESPONSE>
<FEATURES>
<FEATURE>
<ENVELOPE minx="-104.812676033658" miny="38.8389470054157"
maxx="-104.81244896185" maxy="38.839049932579" />
<FIELDS>
<FIELD name="FID" value="152474" />
<FIELD name="SHAPE_AREA" value="2008.734375" />
<FIELD name="SHAPE_LEN" value="189.714570418" />
</FIELDS>
</FEATURE>
</FEATURES>
</RESPONSE>
</ARCXML>
For display, I was thinking of throwing these results into a
gridview... here's what I've written:
Sub showXML(ByVal s As String)
Dim ds As New DataSet
Dim gv As New GridView
Dim xr As System.Xml.XmlReader =
System.Xml.XmlReader.Create(New System.IO.StringReader(s))
ds.ReadXml(xr)
gv.DataSource = ds
gv.DataBind()
Me.GridViewPlaceHolder.Controls.Add(gv)
End Sub
And at runtime, this is what the gridview looks like:
ARCXML_Id version
0 1.1
hmmmm... I was under the impression one could throw XML into a gridview
and the component knew how to handle it automatically... i.e., the tags
describing the data automatically became column headings and the values
automatically became rows??? Also, I don't have a tag "ARCXML_Id"...
where did the "_Id" get appended to the ARCXML?
Why does only the first line of the results make it into the gridview?
How can I get all the XML into the gridview? Suggestions as to where
I'm going wrong with my implementation are greatly appreciated.
Thanks!