I have an HTML, XML, and Javascript file.
I need the HTML page when accessed to display what ever is in the XML
file.
I have these files zipped that I can send, or please look at the
snippet below.
what should display on the HTML page in a table is
name 1 1@test1.com
name 2 te***@name.com
this wont because it is personal and private
personal 1 te***@test3.com
Thank you
=====================
<html>
<!-- Load our XML utilities for data islands and templates -->
<head><script src="xml.js"></script></head>
<!-- Expand all templates on document load -->
<body onload="XML.expandTemplates()">
<!-- This is an XML data island with our data -->
<xml id="data" style="display:none"<!-- hidden with CSS -->
<contacts>
<contact name="name 1"><email>1@example1.com</email></contact>
<contact name="name 2"><email>2@example2.com</email></contact>
<contact name="name 3"><email>4@example3.com</email></contact>
</contacts>
</xml>
<!-- These are just regular HTML elements -->
<table>
<tr><th>Name</th><th>Address</th></tr>
<!-- This is a template. Data comes from the data island with id
"data". -->
<!-- The template will be expanded and copied once for each <contact>
tag -->
<tr datasource="#data" foreach="//contact">
<!-- The "name" attribute of the <contactis inserted into this
element -->
<td data="@name"></td>
<!-- The content of the <emailchild of the <contactgoes in here -->
<td data="email"></td>
</tr<!-- end of the template -->
</table>
</body>
</html>
<?xml version="1.0"?>
<contacts>
<contact name="name 1"><email>1@test1.com</email></contact>
<contact name="name 2"><email>te***@name.com</email></contact>
<contact name="personal 1"
Personal="true"><email>te***@test3.com</email></contact>
</contacts>