i'm having problems with
1) putting a url into xml using php
and once it is in a url
2) parsing it as a hyperlink...
i've tried using & and = to parse the url but i keep getting the 'XML Parsing Error: not well-formed' which points to the & and = signs. or if i'm using <!CDATA it will point to the '<!CDATA'...
if i just try using a simple url (say 'www.google.com ') it parses but it won't display as a hyperlink although by looking at the page source, you would think it would.
i figure rather than me pulling my hair out over it i'd have u guys look at it and see if there are any obvious suggestions
also, here's my stylesheet info (dunno if that matters or not)
1) putting a url into xml using php
and once it is in a url
2) parsing it as a hyperlink...
i've tried using & and = to parse the url but i keep getting the 'XML Parsing Error: not well-formed' which points to the & and = signs. or if i'm using <!CDATA it will point to the '<!CDATA'...
if i just try using a simple url (say 'www.google.com ') it parses but it won't display as a hyperlink although by looking at the page source, you would think it would.
i figure rather than me pulling my hair out over it i'd have u guys look at it and see if there are any obvious suggestions
Code:
private function getItems()
{
$itemsTable = "store_tranlog";
$this->dbConnect($itemsTable);
$query = 'SELECT * FROM `store_tranlog` ORDER BY `date` DESC LIMIT 0,30';
$result = mysql_db_query (DB_NAME, $query, LINK);
$items = '';
while($row = mysql_fetch_array($result))
{
$url = 'http://www.xxx.com/admin/index.php?page=orders&action=viewoldorder&cartid='. $row["cartid"];
$items .= '<item>
<title>'. $row["date"] .'</title>
<link><html><a href="'.$url.'">'.$row["cartid"].'</a></html></link>
//tried cdata... didn't work <![CDATA['.$url.']]>
<description></description>
</item>';
}
$items .= '</channel>
';
return $items;
}
}
Code:
rss {
display: block;
font-family: verdana, arial;
}
title {
display: block;
margin: 5px;
padding: 2px;
color: gray;
border-bottom: 1px solid silver;
}
link {
display: block;
font-size: small;
padding-left: 10px;
}
item {
display: block;
padding: 2px 30px 2px 30px;
}
docs {
display: block;
background-color: #ffffe6;
margin: 20px;
text-align: center;
padding: 5px;
color: #7f7f7f;
border: 1px solid silver;
}
/* all hidden elements */
language, lastBuildDate, ttl, guid, category, description, pubDate {
display: none;
}
Comment