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

Formatting/displaying an image from RSS feed with ASP

Status
Not open for further replies.

ralphonzo

Programmer
Apr 9, 2003
228
0
0
GB
Displaying the RSS feed from Techcrunch - no problem! Getting the image to display in a place where it doesn't look rubbish - big problem!! The first line of text always renders at the foot of the image and to its right. I'd like to be able to wrap it around, or anything else would be an improvement!!!

The image doesn't seem to have a targetable tag (that I can find at any rate).

The parsing ASP code:
Code:
<?xml version="1.0" encoding="utf-8"?>

<html>
<head>
<title>Tech News</title>
<meta name="distribution" content="Global">
<meta http-equiv="content-language" content="EN">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="shortcut icon" href="icon.ico" type="image/x-icon" />
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100" border="0" cellpadding="0" cellspacing="10">
  <tr>
    <td><%
	dim xmlDom, nodeCol, oNode, oChildNode
	set xmlDom = Server.CreateObject("Microsoft.XMLDOM")
	
	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("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 %></td>
  </tr>
</table>
</body>
</html>

The Techcrunch XML code (snippet):
Code:
<channel>
<title>TechCrunch</title>
	
<link>[URL unfurl="true"]http://techcrunch.com</link>[/URL]

<description>TechCrunch is a group-edited blog that profiles the companies, products and events defining and transforming the new web.</description>
	
<lastBuildDate>Wed, 17 Feb 2010 08:53:25 +0000</lastBuildDate>
	
<generator>[URL unfurl="true"]http://wordpress.com/</generator>[/URL]
	
<language>en</language>
	
<sy:updatePeriod>hourly</sy:updatePeriod>
	
<sy:updateFrequency>1</sy:updateFrequency>
	
<cloud domain="techcrunch.com" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" />

<image>
<link>[URL unfurl="true"]http://www.techcrunch.com</link>[/URL]
<url>[URL unfurl="true"]http://www.techcrunch.com/wp-content/themes/techcrunchmu/images/techcrunch_logo.png</url><title>TechCrunch</title>[/URL]
</image>
	
<atom:link rel="search" type="application/opensearchdescription+xml" href="[URL unfurl="true"]http://techcrunch.com/osd.xml"[/URL] title="TechCrunch" />
		
<atom10:link xmlns:atom10="[URL unfurl="true"]http://www.w3.org/2005/Atom"[/URL] rel="self" type="application/rss+xml" href="[URL unfurl="true"]http://feeds.feedburner.com/Techcrunch"[/URL] />

<feedburner:info uri="techcrunch" />

<atom10:link xmlns:atom10="[URL unfurl="true"]http://www.w3.org/2005/Atom"[/URL] rel="hub" href="[URL unfurl="true"]http://pubsubhubbub.appspot.com"[/URL] />

<feedburner:emailServiceId>Techcrunch</feedburner:emailServiceId>

<feedburner:feedburnerHostname>[URL unfurl="true"]http://feedburner.google.com</feedburner:feedburnerHostname>[/URL]

<feedburner:feedFlare href="[URL unfurl="true"]http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FTechcrunch"[/URL] src="[URL unfurl="true"]http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe[/URL] with My Yahoo!</feedburner:feedFlare>

<feedburner:feedFlare href="[URL unfurl="true"]http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FTechcrunch"[/URL] src="[URL unfurl="true"]http://www.newsgator.com/images/ngsub1.gif">Subscribe[/URL] with NewsGator</feedburner:feedFlare>

<feedburner:feedFlare href="[URL unfurl="true"]http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FTechcrunch"[/URL] src="[URL unfurl="true"]http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe[/URL] with My AOL</feedburner:feedFlare>

<feedburner:feedFlare href="[URL unfurl="true"]http://www.bloglines.com/sub/http://feeds.feedburner.com/Techcrunch"[/URL] src="[URL unfurl="true"]http://www.bloglines.com/images/sub_modern11.gif">Subscribe[/URL] with Bloglines</feedburner:feedFlare>

<feedburner:feedFlare href="[URL unfurl="true"]http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FTechcrunch"[/URL] src="[URL unfurl="true"]http://www.netvibes.com/img/add2netvibes.gif">Subscribe[/URL] with Netvibes</feedburner:feedFlare>

<feedburner:feedFlare href="[URL unfurl="true"]http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FTechcrunch"[/URL] src="[URL unfurl="true"]http://buttons.googlesyndication.com/fusion/add.gif">Subscribe[/URL] with Google</feedburner:feedFlare>

<feedburner:feedFlare href="[URL unfurl="true"]http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FTechcrunch"[/URL] src="[URL unfurl="true"]http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&fileName=ATP_blu_91x17.gif">Subscribe[/URL] with Pageflakes</feedburner:feedFlare>

<feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site.</feedburner:browserFriendly>

<item>
		
<title>Google Buzz Warning: Force Feeding Users Can Result In Vomiting</title>

<link>[URL unfurl="true"]http://feedproxy.google.com/~r/Techcrunch/~3/r6TPEhDuHGQ/</link>[/URL]
		
<comments>[URL unfurl="true"]http://techcrunch.com/2010/02/17/google-buzz-warning-force-feeding-users-can-result-in-vomiting/#comments</comments>[/URL]
		
<pubDate>Wed, 17 Feb 2010 08:24:01 +0000</pubDate>
		
<dc:creator>Michael Arrington</dc:creator>
				
<category><![CDATA[Uncategorized]]></category>
		
<category><![CDATA[google]]></category>

		
<guid isPermaLink="false">[URL unfurl="true"]http://techcrunch.com/?p=159277</guid>[/URL]
		
<description><![CDATA[<img src='[URL unfurl="true"]http://tctechcrunch.files.wordpress.com/2010/02/forcefeed.jpg'[/URL] class="shot" alt="" />A <a href="[URL unfurl="true"]http://techcrunch.com/2010/02/09/google-buzz-event/">week[/URL] ago</a> Google launched <a href="[URL unfurl="true"]http://www.crunchbase.com/product/google-buzz">Google[/URL] Buzz</a>. And Google's 175 million or so wordwide Gmail users (Comscore) suddenly had this new and noisy addition to their beloved inbox.

It's been a rough week since then. Both for the Google Buzz team, and those 175 million Gmail users. 

Google continues to tweak the product almost daily to deal with the incredible backlash. That's not what this post is about.

Another thing this post isn't about: the fact that Google was forced to launch the product earlier than they wanted to and didn't have enough time to test the product properly. I'm sure when the dust settles they'll talk about the process and where it went wrong, and what they'll do to avoid a mess like that in the future. They messed up. They know they messed up. It'll pass (see, for example, every interface and policy change ever pushed by Facebook).

What this post <em>is about</em> is the powerful urge companies often have to shoehorn a new product into an old one. To ease the uphill battle all new products face with getting early traction. It seems so easy to just force feed existing users on the new product. But in every example I can think of, those users tend to vomit that new product right back up.<img alt="" border="0" src="[URL unfurl="true"]http://stats.wordpress.com/b.gif?host=techcrunch.com&blog=11718616&post=159277&subd=tctechcrunch&ref=&feed=1"[/URL] />]]></description>
			
<content:encoded><![CDATA[<br /><p><img src='[URL unfurl="true"]http://tctechcrunch.files.wordpress.com/2010/02/forcefeed.jpg'[/URL] class="shot" alt="" />A <a href="[URL unfurl="true"]http://techcrunch.com/2010/02/09/google-buzz-event/">week[/URL] ago</a> Google launched <a href="[URL unfurl="true"]http://www.crunchbase.com/product/google-buzz">Google[/URL] Buzz</a>. And Google’s 175 million or so wordwide Gmail users (Comscore) suddenly had this new and noisy addition to their beloved inbox.</p>
<p>It’s been a rough week since then. Both for the Google Buzz team, and those 175 million Gmail users. </p>
<p>Google continues to tweak the product almost daily to deal with the incredible backlash. That’s not what this post is about.</p>
<p>Another thing this post isn’t about: the fact that Google was forced to launch the product earlier than they wanted to and didn’t have enough time to test the product properly. I’m sure when the dust settles they’ll talk about the process and where it went wrong, and what they’ll do to avoid a mess like that in the future. They messed up. They know they messed up. It’ll pass (see, for example, every interface and policy change ever pushed by Facebook).</p>
<p>What this post <em>is about</em> is the powerful urge companies often have to shoehorn a new product into an old one. To ease the uphill battle all new products face with getting early traction. It seems so easy to just force feed existing users on the new product. But in every example I can think of, those users tend to vomit that new product right back up.</p>
<p>Some users think they’ve been hit with a bait and switch. Others simply don’t like a big change to what they’re used to. And millions more are just clueless about what’s going on, and they get angry and confused.</p>
<p>Examples:</p>
<p>In 2006 AOL, fearing the rise of Digg, <a href="[URL unfurl="true"]http://techcrunch.com/2006/06/14/aol-netscape-launches-massive-digg-like-site/">launched[/URL] a product</a> that was very similar. Instead of launching it on its own site, though, they simply redirected the Netscape portal to the new product. At the time Netscape.com was generating over 800 million monthly page views. The experiment was a failure, and in 2007 AOL <a href="[URL unfurl="true"]http://techcrunch.com/2007/09/11/propeller-will-be-the-new-netscape-digg-clone/">moved[/URL] the product</a> to it’s own domain, Propeller.com. It turned out that Netscape users for the most part didn’t know about, or care about, Digg. They just wanted their familiar news portal.</p>
<p>In 2008 Yahoo launched their own Digg clone, <a href="[URL unfurl="true"]http://techcrunch.com/2008/02/25/yahoo-buzz-launches-with-massive-homepage-traffic-to-push-it/">Yahoo[/URL] Buzz</a>. It was sort of a stand alone product, but the big hook was that stories could be pushed to the Yahoo home page. Yahoo Buzz is still around (I just checked), but it certainly isn’t an interesting product and has never had high user engagement. Again, it turns out Yahoo users weren’t all that interested in Digg. And Digg users certainly weren’t going to start hanging out over at Yahoo.</p>
<p><a href="[URL unfurl="true"]http://techcrunch.com/2007/11/06/liveblogging-facebook-advertising-announcement/">Facebook’s[/URL] Beacon product</a> is another good example. It launched in 2007, and Facebook users were enraged to see their names and pictures being put on “social ads.” <a href="[URL unfurl="true"]http://techcrunch.com/2008/08/14/facebook-gets-slapped-with-another-lawsuit-over-beacon-wishes-it-could-opt-out/">Many[/URL] lawsuits</a> and one heck of a <a href="[URL unfurl="true"]http://techcrunch.com/2008/03/31/why-were-suing-facebook-for-25-million-in-statutory-damages/">great[/URL] April Fools joke</a> later, Beacon stands as Facebook’s biggest stumble to date.</p>
<p>On the other hand, if you take the <a href="[URL unfurl="true"]http://techcrunch.com/2010/01/19/facebook-beacon-blippy/">Beacon[/URL] product idea and start it fresh as a new company</a>, thousands of people flock to join. Everyone knows what they’re signing up to. No one feels screwed over.</p>
<p>Buzz is starting to look like Google’s Beacon moment. Even the Canadians are <a href="[URL unfurl="true"]http://www.cbc.ca/technology/story/2010/02/16/google-buzz-privacy.html">taking[/URL] shots</a> at them now.</p>
<p>Google would have been far better off launching Buzz as a standalone application. Make it invite only to start, and every single one of the early adopters would be begging to get it. A couple of weeks later give them an option of adding Buzz to their Gmail flow, and most would probably do it and call Google brilliant for thinking that one up. Then slowly bring other users on board over time, as they hear about it and want in. Fast forward a year from now and tens of millions of people may happily be using Google Buzz in their Gmail.</p>
<p>But the idea of jumpstarting the process and building the Google social graph <em>right now</em> was too tempting to Google, and they pressed too hard. Maybe some other company, seeing the results, will avoid this mistake in the future.</p>
<div class="cbw snap_nopreview"><div class="cbw_header"><script src="[URL unfurl="true"]http://www.crunchbase.com/javascripts/widget.js"[/URL] type="text/javascript"></script><div class="cbw_header_text"><a href="[URL unfurl="true"]http://www.crunchbase.com/">CrunchBase[/URL] Information</a></div></div><div class="cbw_content"><div class="cbw_subheader"><a href="[URL unfurl="true"]http://www.crunchbase.com/product/google-buzz">Google[/URL] Buzz</a></div><div class="cbw_subcontent"><script src="[URL unfurl="true"]http://www.crunchbase.com/cbw/product/google-buzz.js"[/URL] type="text/javascript"></script></div><div class="cbw_footer">Information provided by <a href="[URL unfurl="true"]http://www.crunchbase.com/">CrunchBase</a></div></div></div>[/URL]
  <a rel="nofollow" href="[URL unfurl="true"]http://feeds.wordpress.com/1.0/gocomments/tctechcrunch.wordpress.com/159277/"><img[/URL] alt="" border="0" src="[URL unfurl="true"]http://feeds.wordpress.com/1.0/comments/tctechcrunch.wordpress.com/159277/"[/URL] /></a> <a rel="nofollow" href="[URL unfurl="true"]http://feeds.wordpress.com/1.0/godelicious/tctechcrunch.wordpress.com/159277/"><img[/URL] alt="" border="0" src="[URL unfurl="true"]http://feeds.wordpress.com/1.0/delicious/tctechcrunch.wordpress.com/159277/"[/URL] /></a> <a rel="nofollow" href="[URL unfurl="true"]http://feeds.wordpress.com/1.0/gostumble/tctechcrunch.wordpress.com/159277/"><img[/URL] alt="" border="0" src="[URL unfurl="true"]http://feeds.wordpress.com/1.0/stumble/tctechcrunch.wordpress.com/159277/"[/URL] /></a> <a rel="nofollow" href="[URL unfurl="true"]http://feeds.wordpress.com/1.0/godigg/tctechcrunch.wordpress.com/159277/"><img[/URL] alt="" border="0" src="[URL unfurl="true"]http://feeds.wordpress.com/1.0/digg/tctechcrunch.wordpress.com/159277/"[/URL] /></a> <a rel="nofollow" href="[URL unfurl="true"]http://feeds.wordpress.com/1.0/goreddit/tctechcrunch.wordpress.com/159277/"><img[/URL] alt="" border="0" src="[URL unfurl="true"]http://feeds.wordpress.com/1.0/reddit/tctechcrunch.wordpress.com/159277/"[/URL] /></a> <img alt="" border="0" src="[URL unfurl="true"]http://stats.wordpress.com/b.gif?host=techcrunch.com&blog=11718616&post=159277&subd=tctechcrunch&ref=&feed=1"[/URL] />
<p><a href="[URL unfurl="true"]http://feedads.g.doubleclick.net/~at/pNCzvdObHkITsAR04UqzTFeRnns/0/da"><img[/URL] src="[URL unfurl="true"]http://feedads.g.doubleclick.net/~at/pNCzvdObHkITsAR04UqzTFeRnns/0/di"[/URL] border="0" ismap="true"></img></a><br/>
<a href="[URL unfurl="true"]http://feedads.g.doubleclick.net/~at/pNCzvdObHkITsAR04UqzTFeRnns/1/da"><img[/URL] src="[URL unfurl="true"]http://feedads.g.doubleclick.net/~at/pNCzvdObHkITsAR04UqzTFeRnns/1/di"[/URL] border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="[URL unfurl="true"]http://feeds.feedburner.com/~ff/Techcrunch?a=r6TPEhDuHGQ:7eUz4CkDRJk:2mJPEYqXBVI"><img[/URL] src="[URL unfurl="true"]http://feeds.feedburner.com/~ff/Techcrunch?d=2mJPEYqXBVI"[/URL] border="0"></img></a> <a href="[URL unfurl="true"]http://feeds.feedburner.com/~ff/Techcrunch?a=r6TPEhDuHGQ:7eUz4CkDRJk:dnMXMwOfBR0"><img[/URL] src="[URL unfurl="true"]http://feeds.feedburner.com/~ff/Techcrunch?d=dnMXMwOfBR0"[/URL] border="0"></img></a> <a href="[URL unfurl="true"]http://feeds.feedburner.com/~ff/Techcrunch?a=r6TPEhDuHGQ:7eUz4CkDRJk:D7DqB2pKExk"><img[/URL] src="[URL unfurl="true"]http://feeds.feedburner.com/~ff/Techcrunch?i=r6TPEhDuHGQ:7eUz4CkDRJk:D7DqB2pKExk"[/URL] border="0"></img></a> <a href="[URL unfurl="true"]http://feeds.feedburner.com/~ff/Techcrunch?a=r6TPEhDuHGQ:7eUz4CkDRJk:7Q72WNTAKBA"><img[/URL] src="[URL unfurl="true"]http://feeds.feedburner.com/~ff/Techcrunch?d=7Q72WNTAKBA"[/URL] border="0"></img></a> <a href="[URL unfurl="true"]http://feeds.feedburner.com/~ff/Techcrunch?a=r6TPEhDuHGQ:7eUz4CkDRJk:yIl2AUoC8zA"><img[/URL] src="[URL unfurl="true"]http://feeds.feedburner.com/~ff/Techcrunch?d=yIl2AUoC8zA"[/URL] border="0"></img></a>
</div><img src="[URL unfurl="true"]http://feeds.feedburner.com/~r/Techcrunch/~4/r6TPEhDuHGQ"[/URL] height="1" width="1"/>]]></content:encoded>
			
<wfw:commentRss>[URL unfurl="true"]http://techcrunch.com/2010/02/17/google-buzz-warning-force-feeding-users-can-result-in-vomiting/feed/</wfw:commentRss>[/URL]
		
<slash:comments>4</slash:comments>
			
<media:content url="[URL unfurl="true"]http://0.gravatar.com/avatar/6a53b0ded89d3ccc428cac0bfafbeb87?s=96&d=identicon&r=G"[/URL] medium="image">
			
<media:title type="html">michael-arrington</media:title>
		
</media:content>

	

	
<media:content url="[URL unfurl="true"]http://tctechcrunch.files.wordpress.com/2010/02/forcefeed.jpg"[/URL] medium="image" />
	
<feedburner:origLink>[URL unfurl="true"]http://techcrunch.com/2010/02/17/google-buzz-warning-force-feeding-users-can-result-in-vomiting/</feedburner:origLink></item>[/URL]
		<item>
		<title>Facebook’s Mobile Strategy Condensed Into 16 Minutes (Video)</title>
		<link>[URL unfurl="true"]http://feedproxy.google.com/~r/Techcrunch/~3/NIEUwf1l2x0/</link>[/URL]
		<comments>[URL unfurl="true"]http://techcrunch.com/2010/02/16/facebook-mobile-strategy/#comments</comments>[/URL]
		<pubDate>Wed, 17 Feb 2010 07:23:30 +0000</pubDate>
		<dc:creator>Robin Wauters</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[facebook mobile]]></category>
		<category><![CDATA[facebook zero]]></category>

		<guid isPermaLink="false">[URL unfurl="true"]http://techcrunch.com/?p=159515</guid>[/URL]
		<description><![CDATA[<img src="[URL unfurl="true"]http://tctechcrunch.files.wordpress.com/2010/02/fb-mobile-1.jpg"[/URL] />Yesterday, in a session on 'Mobile Communications 2.0' at the Mobile World Congress in Barcelona, Facebook's VP of User Growth, Mobile and International Expansion <a href="[URL unfurl="true"]http://www.crunchbase.com/person/chamath-palihapitiya">Chamath[/URL] Palihapitiya</a> shared the social networking giant's current mobile strategy and its plans for the future. 

It was in this session that the company for the first time talked about its latest product, <a href="[URL unfurl="true"]http://techcrunch.com/2010/02/16/facebook-launches-zero-a-text-only-mobile-site-for-carriers/">Facebook[/URL] Zero</a>, which is essentially a stripped down, text-only version of the mobile website for the social networking service. The product aims to give mobile carriers a way to offer a basic Facebook experience to their subscribers free of charge and later convert those users into premium data service customers.<img alt="" border="0" src="[URL unfurl="true"]http://stats.wordpress.com/b.gif?host=techcrunch.com&blog=11718616&post=159515&subd=tctechcrunch&ref=&feed=1"[/URL] />]]></description>

The image in this case is located under "media:content url", but try as I might, I can't actively grab it or split it from the stream.

Any ideas?
 
[0] If the fragment posted reflects faithfully what is received, you would have a difficult time to "load" it. Some of the nodes have ampersand unencoded and are therefore ill-formed.

[1] There would be a long story to make the parsing exactly right. Here is just a minimal sketch to allow you to discover the result rightaway.

[1.1] I can only presume you've probably the version 6.0 installed on the server, otherwise, varying on the verson suggested.
>set xmlDom = Server.CreateObject("Microsoft.XMLDOM")
[tt]set xmlDom = Server.CreateObject("Msxml2.FreeThreadedDomDocument.6.0") '4.0 or up (5.0 or 6.0)[/tt]

[1.2] With that set up, added this part to get the image.
[tt]
set oChildNode=oNode.selectSingleNode("*[local-name()='content']/@url")
if not oChildNode is nothing then
Response.Write "<img src=""" & oChildNode.NodeValue & """ alt=""" & ochildnode.NodeValue & """ /><br />" & vbcrlf
end if
[/tt]
[2] Once you see the results, you have to work back on the topics of namespace prefix, xpath, msxml2.domdocument and msxml2.freethreadeddomdocument controls and their versions and variations on their default behaviour. That cannot to be told on posts like this.
 
Thanks for the reply Tsuji. Unfortunately I get the error message:
Code:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/dev/inc_rss.asp, line 26
800401f3

with line 26 being the new code:
Code:
set xmlDom = Server.CreateObject("Msxml2.FreeThreadedDomDocument.6.0")

I'm rather hoping that step 1 will fix it, as 2topics of namespace prefix, xpath, msxml2.domdocument and msxml2.freethreadeddomdocument controls and their versions and variations on their default behaviour" fills me with dread, not knowing what any of them are!!
 
[1.1.1] As said, if the server has not v6.0 installed, try varying (or better investigating properly) it to probe which version of msxml2 is installed. In the meantime, try, as said, these:
[tt]
set xmlDom = Server.CreateObject("Msxml2.FreeThreadedDomDocument.4.0")
'or if it fails
'set xmlDom = Server.CreateObject("Msxml2.FreeThreadedDomDocument.5.0")
[/tt]
 
OK, sorry, I didn't realise there were 3 different options available. Version 4.0 must be installed, as that's the one that allows the rendering of content. There's still no light on though, as a new image has popped up and is being targetted. I've uploaded a live version: with the new image indicated with 'XYZ' string for identification:

Code:
Response.Write "<img src=""" & oChildNode.NodeValue & """ alt=""" & ochildnode.NodeValue & """ />XYZ<br />" & vbcrlf
 
>There's still no light on though, as a new image has popped up and is being targetted.
What do you mean? no light of what? Why do you not anticipate "new" image for each "content" of each "item"? The feed is not yours. It is up to that author to decide.
 
If there's a tag, I can pick it up. I'm not an XML scripter and I don't have the time to learn all the ins and outs of the language in order to break apart the 'content' tag (if that's possible. I just want to be able to display the feed in a more pleasing manner. I understand that I need to do some authoring, but I don't have the first idea of how to get into the guts of a particular tag. I spent several hours via Google before I asked for help here. That's all I'm asking for - a little help.
 
Am I not helping all along?

>The image in this case is located under "media:content url", but try as I might, I can't actively grab it or split it from the stream.
I had shown you how to grab the url. Is it not what you want to get as a help?

The img tag is not fabrication in order to help you see that you actually get the url in the content tag. You can do whatever you like with it. My img tag is not imposing on you in any way except to show you what you get out of the object oChildNode.

>If there's a tag, I can pick it up.
If you think you can do thing if you grab the "content" tag, then here it is.
[tt]
set oChildNode=oNode.selectSingleNode("*[local-name()='content']")
[/tt]
In contrast to what was suggested which get you the url attribute directly.

>[self][tt]set oChildNode=oNode.selectSingleNode("*[local-name()='content'][red]/@url[/red]")[/tt]

I am not imposing on anything. I am not judging on anything if the feeds are yours or not. I just put every part to its origin and who is responsible for it. You may as well in another role be the author of the feed. That is as good to me as well.
 
I'm sorry to sound like a thicky, but all that 'set oChildNode=oNode.selectSingleNode("*[local-name()='content']/@url")' grabs out of the stream is an image that previously didn't show up and I don't want anyway. I've no idea how to grab any other elements from content.

The unwanted image is from ' while the required image is located at '
I've carried out a lot of different experiments trying to display the content of 'content' (which displays the unwanted URL, and 'description' (which displays nothing) and I'm just getting nowhere. Am I missing something absolutely fundamental?
 
My understanding is that you start with desiring to get the url and that you end up with not desiring it; that you can do thing if you grab the ("content") tag and that you end up with not knowing how to go thing with the tag...

I cannot help under the terms of moving target.

But at least I wish you knew the syntax of "if <conditions> then <do thing> else <do other thing> end if" vbscript syntax?

>Am I missing something absolutely fundamental?
I cannot tell you. It has nothing to do with the xml technologies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top