View Full Version : xml beginner - images/links for HTML?


db1games
12-09-2004, 07:47 PM
I want to know how to include HTML code in my xml - can I just put in <a href="url here">text</a> like I normally would or would that not work in xml?

I'm a complete beginner at this sort of thing and don't want to use anything other than xml, CSS, HTML or javascript for my site (none of which I am proficient at).

Basically I am using this xml for the information in my blog (it is called blog.xml):
<CATALOG>
<CD>
<TITLE>Title goes here</TITLE>
<DATE> Date here </DATE>
<COMMENT>Whatever rubbish I put in goes here</COMMENT>
<EMPTY> </EMPTY>
</CD>
</CATALOG>

I then have a css file called blog.css with the colour information in:
A:link
{ text-decoration: none; color:#0000FF; }
A:visited
{ text-decoration: none; color:#0000FF; }
A:active
{ text-decoration: none; color:#0000FF; }
A:hover
{ text-decoration: underline overline; color:#0000FF; }
body
{
background: #C5C5C5;
color: #333333;

scrollbar-face-color : #555555;
scrollbar-highlight-color : #666666;
scrollbar-3dlight-color : #777777;
scrollbar-shadow-color : #444444;
scrollbar-darkshadow-color : #333333;
scrollbar-track-color : #888888;
scrollbar-arrow-color : #999999;

margin-top: 0;
margin-left: 0;
}
b
{
color: #757575;
}

Finally I have the HTML file (blog.html) with this in:
<html>
<head>
<!--My javascript for the title bar goes here but I haven't included it as it isn't necessary-->
</head>
<body>
<center>
<table border="0" cellspacing="0" cellpadding="0" width="750">
<tr>
<td>
<center><img src="http://db1games.topcities.com/header.gif" width="750" height="50" border="0"></center>
</td>
</tr>
<tr>
<td bgcolor="#000000">
<table>
<tr>
<td>Header bar links go here</td><td>Flash MX Atomz search goes here</td></tr></table>
</td>
</tr>
<tr>
<td>
<xml id="blog" src="blog.xml"></xml>
<LINK href="blog.css" rel="stylesheet" type="text/css">
<center>
<br>
<table border="0" datasrc="#blog" cellspan="0" width="700">
<thead>
<tr><th colspan="3"><center><h1>db1games: james' blog</h1></center></th></tr>
</thead>

<tr>
<td bgcolor=#333333><b><span datafld="DATE"></span> - <span datafld="TITLE"></span></b></td>
</tr>
<td bgcolor=#888888><span datafld="COMMENT"></span></td>
</tr>
<tr>
<td><span datafld="EMPTY"></span></td>
<td><span datafld="EMPTY"></span></td>
</tr>

</table>
</center>
</td>
</tr>
</table>
</center>

</body>
</html>

I think the best way to edit it so that I can put pictures and links in my blog would be to include something in the xml but I don't know how to do this. Can someone please help?