Hi, I've been going bonkers trying to format the data from an RSS feed. The problem I'm having is with the image/text wrap. Is it possible to disable that?
Here's the code I'm using:
Any thoughts?
Here's the code I'm using:
Code:
dim xmlDom, nodeCol, oNode, oChildNode
set xmlDom = Server.CreateObject("MSXML2.Domdocument.4.0")
call xmlDom.setProperty("ServerHTTPRequest", true)
xmlDom.async = false
'call xmlDom.load("[URL unfurl="true"]http://feeds.feedburner.com/Techcrunch")[/URL]
call xmlDom.load("[URL unfurl="true"]http://www.postconflictheritage.com/home/pch_blog/rss.xml")[/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("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
Any thoughts?