Hello everyone...
I'll get right to the point. I am learning XML and how it can be used as a data source to be viewed within a table in an HTML document. I have been working with a snippet of example code and so far it works great. I am having trouble turning text strings into hyperlinks and also cant find the XML code to display an image when called from the HTML document. I hope I'm making sense...
Below is the code for both my XML & HTML documents:
*********HTML FILE***********
<html>
<head>
<title>XML DSO-example3.htm</title>
<script language="JavaScript">
function load() {
var xmlDso=myXML.XMLDocument;
xmlDso.load("example3.xml");
}
</script>
</head>
<body bgcolor="#FFFFFF" onLoad="load()">
<object id="myXML" CLASSID="clsid:550dda30-0541-11d2-9ca9-0060b0ec3d39" width="0" height="0"></object>
<table datasrc="#myXML" border="1">
<thead>
<th>Message</th>
<th>Link</th>
</thead>
<tr>
<td width=300><div datafld="message"></div></td>
<td width=300><div datafld="URL"></div></td>
</tr>
</table>
</body>
</html>
***********XML FILE*************
<?xml version="1.0" ?>
<ticker>
<item>
<message>JavaScript Ticker using XML DSO</message>
<URL> </item>
<item>
<message>test</message>
<URL> </item>
</ticker>
***********************
Now I'm guessing it has something to do with the <ticker> portion but I don't know enough. Can anyone help me out please. I appreciate it.
prmirage
I'll get right to the point. I am learning XML and how it can be used as a data source to be viewed within a table in an HTML document. I have been working with a snippet of example code and so far it works great. I am having trouble turning text strings into hyperlinks and also cant find the XML code to display an image when called from the HTML document. I hope I'm making sense...
Below is the code for both my XML & HTML documents:
*********HTML FILE***********
<html>
<head>
<title>XML DSO-example3.htm</title>
<script language="JavaScript">
function load() {
var xmlDso=myXML.XMLDocument;
xmlDso.load("example3.xml");
}
</script>
</head>
<body bgcolor="#FFFFFF" onLoad="load()">
<object id="myXML" CLASSID="clsid:550dda30-0541-11d2-9ca9-0060b0ec3d39" width="0" height="0"></object>
<table datasrc="#myXML" border="1">
<thead>
<th>Message</th>
<th>Link</th>
</thead>
<tr>
<td width=300><div datafld="message"></div></td>
<td width=300><div datafld="URL"></div></td>
</tr>
</table>
</body>
</html>
***********XML FILE*************
<?xml version="1.0" ?>
<ticker>
<item>
<message>JavaScript Ticker using XML DSO</message>
<URL> </item>
<item>
<message>test</message>
<URL> </item>
</ticker>
***********************
Now I'm guessing it has something to do with the <ticker> portion but I don't know enough. Can anyone help me out please. I appreciate it.
prmirage