xml data isalands can be bound to HTML elements
In the example below, an XML Data Island with an ID of "cdcat" is loaded from an extreme XML file ("cd_catalog.xml").Next, the HTML table element is bound to the Data Island with the datasrc attribute, and finally the td elements are bound to the XML data with a datafld attribute inside a span element
<html>
<body>
<xml id ="cdcat" src="cd_catalog.xml"></xml>
<table border="1" datasrc="#cdcat">
<thread>
<tr><th>Artist</th><th><Title</th></tr>
</thread>
<tfoot>
<tr>
<th colspan\"2">This is my CD collection </th></tr>
</tfoot>
<tbody>
<tr>
<td><span datafld="artist"></span></td>
<td><span datafld="title"></span></td>
</tr>
</tbody>
</table>
</body>
</html>
April 19, 2009
0 DATA BINDING
Posted by raj on 4:04 AM
0 comments:
Post a Comment