XML DataBinding Example

 

Data Islands can be bound to HTML elements (like HTML tables). In the example below, an XML Data Island with an ID "cdcat" is loaded from an external XML file. An HTML table is bound to the Data Island with a data source attribute, and finally the tabledata elements are bound to the XML data with a data field attribute inside a span.

 

<html>
<body>

<xml id="cdcat" src="cd_catalog.xml"> </xml>

<table border="1" datasrc="#cdcat">
<tr>
<td><span datafld="ARTIST"></span></td>
<td><span datafld="TITLE"></span></td>
</tr>
</table>

</body>
</html>

see it working
cd_catalog.xml file
© Lynne Grewe