Ok...here's another one I followed to the letter and syntax errors all over the place.
First, Page 397 TIO-1503, step one there should be a "/" before the "bookstore/genre[@name='Fiction']/book
This happens in several places.
Also--
WHY when I follow TIO 1503 do I not get a root "Bookstore" node...this is what i Get:
(NOTE--I had to manually add the datamember "Bookstore"..it didn't appear in the databindings list)
A Tale of Two Cities
Abstract...
Abstract...
Abstract...
Pride And Prejudice
Abstract...
Abstract...
Abstract...
The Old Man and the Sea
Abstract...
Abstract...
Abstract...
And here is my code:
<%@ Page Language="
VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="../App_Data/Bookstore.xml"
XPath="/Bookstore/genre[@name='Fiction']/*"></asp:XmlDataSource>
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1">
<DataBindings>
<asp:TreeNodeBinding DataMember="Bookstore" TextField="#Name" />
<asp:TreeNodeBinding DataMember="genre" TextField="name" />
<asp:TreeNodeBinding DataMember="book" TextField="Title" />
<asp:TreeNodeBinding DataMember="chapter" TextField="#InnerText" />
</DataBindings>
</asp:TreeView>
</div>
</form>