re:
> Is there something I did wrong with what I have used?
The two lines of code you sent are not enough to determine that.
Offhand, did you import the system.data namespace ?
<%@ Import Namespace="System.Data" %>
re:
> Is there a pit that I fell into (perhaps with the creation of the .xml)
> that would cause problems?
It's hard to tell unless you post the xml itself
or run the xml file through an xml validator.
If you want to do the latter, Peter's XML Editor will tell you
if the file's XML is well-formed when you attempt to load it.
Get it at :
http://www.iol.ie/~pxe/index.html
re:
> Should I place .xml files in a different directory?
You might as well, since with ASP.NET 2.0 xml data goes in the App_Data dir.
re:
>I was following the examples I had seen on the internet to make the
> code work.
The thing is that data access examples "on the internet", and particularly examples
of binding to xml datasources, are unnecessarily complicated and, if all you want
to do is display the contents of an xml file, just place your xml file in your
application's App_Data directory ( if one doesn't exist, create it ), change
the Datafile's name to your XML's filename, and run this extremely short sample :
ShowXML.aspx:
------------------
<%@ Page Language="VB"%>
<html>
<body>
<form id="showXML" runat="server">
<asp:XmlDataSource id="MySource" DataFile="~/App_Data/your.xml" runat="server"/>
<asp:TreeView
SkinId="Bookstore"
DataSourceId="MySource"
ExpandDepth="3"
MaxDataBindDepth="3"
runat="server"
/>
</form>
</body>
</html>
----------
Easier access to XML data sources is one of
the benefits which ASP.NET 2.0 brings us.
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ :
http://asp.net.do/faq/
Foros de ASP.NET en Espaņol :
http://asp.net.do/foros/
======================================
"milkyway" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I was following the examples I had seen on the internet to make the
> code work.
>
> I had wanted to get a list of the items on the server and manipulate
> the list (on the server).
>
> Is there something I did wrong with what I have used? Is there a pit
> that I fell into (perhaps with the creation of the .xml) that would
> cause problems? Should I place .xml files in a different directory?
>
> I guess I am kinda lost here as to where I can look for the problem or
> how one might use the debugger to track it down ;-(
>