Does anyone have an idea how to interogate the 'description' tag of the rss feed from TechCrunch? I can't identify the image within the content in order to format it, and no matter what I try the text always pops up to its right at the bottom. I'm rubbish with XML!
There's a live model of what's happening at:
and here's my ASP/VBScript code:
There's a live model of what's happening at:
and here's my ASP/VBScript code:
Code:
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -->
<?xml version="1.0" encoding="utf-8"?>
<html>
<head>
<title>Clockwork Gallery</title>
<meta http-equiv="content-language" content="EN">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100" border="0" cellpadding="0" cellspacing="10">
<tr>
<td><%
dim xmlDom, nodeCol, oNode, oChildNode
set xmlDom = Server.CreateObject("Microsoft.XMLDOM")
'set xmlDom = Server.CreateObject("Msxml2.FreeThreadedDomDocument.4.0")
call xmlDom.setProperty("ServerHTTPRequest", true)
xmlDom.async = false
'call xmlDom.load("[URL unfurl="true"]http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/technology/rss.xml")[/URL]
call xmlDom.load("[URL unfurl="true"]http://feeds.feedburner.com/Techcrunch")[/URL]
if not xmlDom.documentElement is nothing then
set nodeCol = xmlDom.documentElement.selectNodes("channel/item")
for each oNode in nodeCol
Response.Write("<p>"& vbCrLf)
'set oChildNode=oNode.selectSingleNode("*[local-name()='content']/@url")
'if not oChildNode is nothing then
'Response.Write "<img src=""" & oChildNode.NodeValue & """ alt=""" & ochildnode.NodeValue & """ />XYZ<br />" & vbcrlf
'end if
set oChildNode = oNode.selectSingleNode("title")
if not oChildNode is nothing then
Response.Write(" <h3>" & oChildNode.text & "</h3>" & vbCrLf)
end if
'set oChildNode = oNode.selectSingleNode("pubDate")
'if not oChildNode is nothing then
' Response.Write(" » " & oChildNode.text & "<br />" & vbCrLf)
'end if
set oChildNode = oNode.selectSingleNode("description")
if not oChildNode is nothing then
Response.Write(" " & oChildNode.text & "<br />" & vbCrLf)
end if
set oChildNode = oNode.selectSingleNode("link")
if not oChildNode is nothing then
Response.Write(" <br />" & vbCrLf)
Response.Write(" <a href=""" & oChildNode.text & """ target=""_blank"">")
Response.Write(" more..." & vbCrLf)
Response.Write(" </a>" & vbCrLf)
end if
Response.Write("</p>" & vbCrLf)
next
else
Response.Write("<p>" & vbCrLf)
Response.Write(" Sorry, no news today!" & vbCrLf)
Response.Write("</p>" & vbCrLf)
end if %></td>
</tr>
</table>
</body>
</html>