
September 5th, 2003, 05:48 PM
|
|
Up To His Eyes In Ads
|
|
Join Date: Oct 2002
Location: Chicago
Posts: 160
Time spent in forums: 1 m 25 sec
Reputation Power: 8
|
|
|
Displaying data from XPathNodeIderator
So I've got an XPathNodeIderator getting data out of an XML document. Something like this... and this works. (There are lots of examples floating aroud...)
Code:
Dim myXMLdoc As New XmlDocument()
myXMLdoc.Load(Server.MapPath("myXMLFile.xml"))
Dim nav As XPath.XPathNavigator = myXMLdoc.CreateNavigator
' find node in xml document
Dim xIter As XPath.XPathNodeIterator = nav.Select("//name")
While xIter.MoveNext
'write out value of node
Response.Write(xIter.Current.Value)
Response.Write("<br>")
End While
My question is once I've got the XPathNodeIderator loaded with my data, how do I display it on the web? I can't seem to load it into a datagrid or a dataset then a datagrid. Sure, I can Response.Write it but it seems kind of sloppy and it doesn't separate presentation from logic... What's the most efficient way to display the data?
|