XML Document:
<?xml version="1.0"?> <catalog> <book> <author>Simon St.Laurent</author> <title>XML Elements of Style</title> <pubyear>2000</pubyear> <publisher>McGraw-Hill</publisher> <isbn>0-07-212220-X</isbn> <price>$29.99</price> </book> <book> <author>Simon St.Laurent</author> <title>XML: A Primer, 2nd Ed.</title> <pubyear>1999</pubyear> <publisher>IDG Books</publisher> <isbn>0-7645-3310-X</isbn> <price>$19.99</price> </book> <book> <author>Simon St.Laurent</author> <title>Building XML Applications</title> <pubyear>1999</pubyear> <publisher>McGraw-Hill</publisher> <isbn>0-07-134116-1</isbn> <price>$49.99</price> </book> </catalog>
HTML Wrapper:
<html> <head> <title> Data binding Example </title> </head> <body> <XML ID="dsoCatalog" SRC="books.xml"></XML> <table datasrc="#dsoCatalog"> <thead> <tr> <th>Title</th> <th>Author</th> <th>Pub Date</th> <th>Publisher</th> <th>ISBN</th> <th>Price</th> </tr> </thead> <tbody> <tr> <td><cite><span datafld="title"></span></cite></td> <td><span datafld="author"></span></td> <td><span datafld="pubyear"></span></td> <td><span datafld="publisher"></span></td> <td><span datafld="isbn"></span></td> <td><span datafld="price"></span></td> </tr> </tbody> </table> </body> </html>
Copyright 2000 Simon St.Laurent