Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 and Databases
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 and Databases by John Kauffman, Bradley Millington; ISBN: 9780471781349
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 and Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 11th, 2006, 08:28 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 238
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to rsearing
Default Chapter 15 Problem

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>

 
Old October 12th, 2006, 12:46 PM
Authorized User
 
Join Date: May 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

rsearing
Could you post your XML file?

 
Old October 12th, 2006, 02:58 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 238
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to rsearing
Default

John,

It is the same one in the download:

<Bookstore>
  <genre name="Fiction">Includes historical fiction
    <book ISBN="10-861003-324" Title="A Tale of Two Cities" Price="19.99">
      <chapter num="1" name="Introduction">
        Abstract...
      </chapter>
      <chapter num="2" name="Body" rating="wow">
        Abstract...
      </chapter>
      <chapter num="3" name="Conclusion">
        Abstract...
      </chapter>
    </book>
    <book ISBN="1-861001-57-5" Title="Pride And Prejudice" Price="24.95">
      <chapter num="1" name="Introduction">
        Abstract...
      </chapter>
      <chapter num="2" name="Body">
        Abstract...
      </chapter>
      <chapter num="3" name="Conclusion">
        Abstract...
      </chapter>
    </book>
    <book ISBN="1-861001-57-6" Title="The Old Man and the Sea" Price="27.95">
      <chapter num="1" name="Introduction">
        Abstract...
      </chapter>
      <chapter num="2" name="Body">
        Abstract...
      </chapter>
      <chapter num="3" name="Conclusion">
        Abstract...
      </chapter>
    </book>
  </genre>
  <genre name="NonFiction">Including Literary criticism
    <book ISBN="98-765142-654" Title="Italian-Thai Fusion cooking" Price="29.65">
      <chapter num="1" name="Pasta vs Noodles">
        Abstract...
      </chapter>
      <chapter num="2" name="Tomatoes and Mangos" difficulty="easy">
        Abstract...
      </chapter>
      <chapter num="3" name="Durian - the Miracle Fruit">
        Abstract...
      </chapter>
      <chapter num="4" name="Passion Fruit and Amore">
        Abstract...
      </chapter>
      <chapter num="5" name="Recipes">
        Abstract...
      </chapter>
    </book>
    <book ISBN="5-134685-85-5" Title="How to Live Forever" Price="128.95">
      <chapter num="1" name="Long, Long Term Investing">
        Abstract...
      </chapter>
      <chapter num="2" name="Picking Your Parents">
        Abstract...
      </chapter>
      <chapter num="3" name="Summary">
        Abstract...
      </chapter>
    </book>
    <book ISBN="6-6734-261548-8" Title="Air - A User's Guide to Breathing" Price="18.95">
      <chapter num="1" name="Inhale">
        Abstract...
      </chapter>
      <chapter num="2" name="Exhale">
        Abstract...
      </chapter>
      <chapter num="3" name="Repeat for Life">
        Abstract...
      </chapter>
    </book>
  </genre>
</Bookstore>

Kind Regards,
Rob

 
Old October 12th, 2006, 02:59 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 238
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to rsearing
Default

Here it is:

<Bookstore>
  <genre name="Fiction">Includes historical fiction
    <book ISBN="10-861003-324" Title="A Tale of Two Cities" Price="19.99">
      <chapter num="1" name="Introduction">
        Abstract...
      </chapter>
      <chapter num="2" name="Body" rating="wow">
        Abstract...
      </chapter>
      <chapter num="3" name="Conclusion">
        Abstract...
      </chapter>
    </book>
    <book ISBN="1-861001-57-5" Title="Pride And Prejudice" Price="24.95">
      <chapter num="1" name="Introduction">
        Abstract...
      </chapter>
      <chapter num="2" name="Body">
        Abstract...
      </chapter>
      <chapter num="3" name="Conclusion">
        Abstract...
      </chapter>
    </book>
    <book ISBN="1-861001-57-6" Title="The Old Man and the Sea" Price="27.95">
      <chapter num="1" name="Introduction">
        Abstract...
      </chapter>
      <chapter num="2" name="Body">
        Abstract...
      </chapter>
      <chapter num="3" name="Conclusion">
        Abstract...
      </chapter>
    </book>
  </genre>
  <genre name="NonFiction">Including Literary criticism
    <book ISBN="98-765142-654" Title="Italian-Thai Fusion cooking" Price="29.65">
      <chapter num="1" name="Pasta vs Noodles">
        Abstract...
      </chapter>
      <chapter num="2" name="Tomatoes and Mangos" difficulty="easy">
        Abstract...
      </chapter>
      <chapter num="3" name="Durian - the Miracle Fruit">
        Abstract...
      </chapter>
      <chapter num="4" name="Passion Fruit and Amore">
        Abstract...
      </chapter>
      <chapter num="5" name="Recipes">
        Abstract...
      </chapter>
    </book>
    <book ISBN="5-134685-85-5" Title="How to Live Forever" Price="128.95">
      <chapter num="1" name="Long, Long Term Investing">
        Abstract...
      </chapter>
      <chapter num="2" name="Picking Your Parents">
        Abstract...
      </chapter>
      <chapter num="3" name="Summary">
        Abstract...
      </chapter>
    </book>
    <book ISBN="6-6734-261548-8" Title="Air - A User's Guide to Breathing" Price="18.95">
      <chapter num="1" name="Inhale">
        Abstract...
      </chapter>
      <chapter num="2" name="Exhale">
        Abstract...
      </chapter>
      <chapter num="3" name="Repeat for Life">
        Abstract...
      </chapter>
    </book>
  </genre>
</Bookstore>






Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter 15 problem golfbird BOOK: Beginning Visual C++ 6 7 September 9th, 2008 12:29 PM
Chapter 15 problem PhilM BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 16 March 10th, 2008 02:46 PM
chapter 15 checkout3.php problem derrida BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 November 12th, 2006 10:11 AM
Chapter 15 Search Problem PhilM BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 November 2nd, 2004 05:08 PM
A new chapter 15 problem with BBcodes PhilM BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 September 11th, 2004 11:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.