mjohnson24
Technical User
Hi i have a file called index.html that is set up to pull data from an external xml file. It lists multiple different sermons for my church that i want to be able to have a person click on one of the titles and it will download the audio file for them. Below is what i have so far in the xml file and the index.html file. But If i add the link= tag in the title of the xml file then it makes the titles disappear when i view it in the browser but if i keep the link= out then the columns display correctly. Any Ideas? I also want another link that they can click on that will allow them to just play it through the browser if possible. So one button for downloading the file and one to jsut play in browser.
HTMl File:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<xml id="myExternalData" src="items.xml"/>
<table datasrc='#myExternalData' border="1">
<thead>
<tr>
<th>
Message Title</th>
<th>
Artist</th>
<th>
Sermon Date</th>
<th>
Message Length</th>
<th>
Download</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span datafld='title' />
</td>
<td>
<span datafld='artist' />
</td>
<td>
<span datafld='date' />
</td>
<td>
<span datafld='length' />
</td>
<td>
<span datafld='links' />
</td>
</tr>
</tbody>
</table>
</body>
</html>
XML File:
<?xml version="1.0"?>
<items>
<item id="item1">
<title>Nothings too Hard for God</title>
<artist>Scott Holmes</artist>
<date>9/6/2009</date>
<length>1:07:02</length>
</item>
<item id="item2">
<title>Nothings too Hard for God 2</title>
<artist>Justin Grace</artist>
<date>9/13/2009</date>
<length>30:12</length>
</item>
<item id="item3">
<title>Nothings too Hard for God 3</title>
<artist>Joben Murray</artist>
<date>9/20/2009</date>
<length>55:48</length>
</item>
<item id="item4">
<title link=" too Hard for God 4.m4a">Nothings too Hard for God 4</title>
<artist>Scott Holmes</artist>
<date>9/27/2009</date>
<length>42:47</length>
</item>
</items>
HTMl File:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<xml id="myExternalData" src="items.xml"/>
<table datasrc='#myExternalData' border="1">
<thead>
<tr>
<th>
Message Title</th>
<th>
Artist</th>
<th>
Sermon Date</th>
<th>
Message Length</th>
<th>
Download</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span datafld='title' />
</td>
<td>
<span datafld='artist' />
</td>
<td>
<span datafld='date' />
</td>
<td>
<span datafld='length' />
</td>
<td>
<span datafld='links' />
</td>
</tr>
</tbody>
</table>
</body>
</html>
XML File:
<?xml version="1.0"?>
<items>
<item id="item1">
<title>Nothings too Hard for God</title>
<artist>Scott Holmes</artist>
<date>9/6/2009</date>
<length>1:07:02</length>
</item>
<item id="item2">
<title>Nothings too Hard for God 2</title>
<artist>Justin Grace</artist>
<date>9/13/2009</date>
<length>30:12</length>
</item>
<item id="item3">
<title>Nothings too Hard for God 3</title>
<artist>Joben Murray</artist>
<date>9/20/2009</date>
<length>55:48</length>
</item>
<item id="item4">
<title link=" too Hard for God 4.m4a">Nothings too Hard for God 4</title>
<artist>Scott Holmes</artist>
<date>9/27/2009</date>
<length>42:47</length>
</item>
</items>