Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to XML and learning

Status
Not open for further replies.

prmirage

Technical User
Jun 29, 2007
1
US
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
 
[tt] <tr>
<td width=300><span datafld="message"></span></td>
<td width=300>[blue]<a datafld="URL"><span datafld="URL"></span></a>[/blue]</td>
</tr>[/tt]
 
> 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.
The hyperlink case is shown above. The image is practically the same whereas the URL contains a url pointing to some image.
[tt]
<tr>
<td width=300><span datafld="message"></span></td>
<td width=300><[blue]img datafld="URL" alt="an image" /[/blue]></td>
</tr>
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top