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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting embedded images from RSS feed

Status
Not open for further replies.

ralphonzo

Programmer
Apr 9, 2003
228
0
0
GB
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:

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://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("  &raquo; " & 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
I posted this question a few days ago in the VBScript forum and got no joy. Any thoughts from this one?

Oh, and I'm more than happy to use any language (that works) in order to perform this task.
 
If it's a client-side formatting problem you're having trouble with, you should probably post the client-side code (not the server-side code above) in a new thread in forum215 and also mention things like what browser you are having the problem in.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top