[DOM] simple question de dom
Bonjour,
je suis tout nouvo sur le site et j'ai une question simple à poser. Je n'arrive pas à acceder à un attribut d'un noeud en xml/rss :
voici mon script me donne le link , le titre de façon qui suit
Code:
1 2 3 4 5 6
|
function displayfeed(result){
if (!result.error){
var thefeeds=result.feed.entries
for (var i=0; i<thefeeds.length; i++)
var link =thefeeds[i].link; |
(...)
mais je n'arrive pas à atteindre un attribut de media:thumbnail ou enclosure
comment faire ?
merci beaucoup de votre aide
stephane
voici mon rss :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| /////////////////////////////////////////////////////////////////
<item>
<title>zoom.wmv</title>
<description />
<pubDate>Tue, 23 Dec 2008 15:55:48 GMT</pubDate>
<media:thumbnail width="488" height="516" url="http://content.screencast.com/media/2c6ed2d4-0bb6-4659-aeb2-0fe11720784e_b878da9d-3d09-46e6-b285-5fc67c71acf3_static_0_0_Thumbnail.gif" />
<media:content url="http://content.screencast.com/media/b2518834-2280-47fc-a59f-5a930db5ae87_b878da9d-3d09-46e6-b285-5fc67c71acf3_static_0_0_zobi.wmv" width="488" height="516" duration="17" fileSize="366953" type="video/x-ms-wmv" />
<enclosure url="http://content.screencast.com/media/b2518834-2280-47fc-a59f-5a930db5ae87_b878da9d-3d09-46e6-b285-5fc67c71acf3_static_0_0_zobi.wmv" type="video/x-ms-wmv" length="366953" />
</item>
<item>
<title>11/23/2007 12:39 </title>
<description />
<pubDate>Fri, 23 Nov 2007 11:44:47 GMT</pubDate>
<media:thumbnail width="1276" height="789" url="http://content.screencast.com/media/65898a78-e582-4533-a56d-8a2495a2371e_b878da9d-3d09-46e6-b285-5fc67c71acf3_static_0_0_Thumbnail.gif" />
<media:content url="http://content.screencast.com/media/a3e320d5-a0d6-4b3d-8f5a-ea43d20e580f_b878da9d-3d09-46e6-b285-5fc67c71acf3_static_0_0_video.swf" width="1276" height="789" duration="300" fileSize="5717437" type="application/x-shockwave-flash" />
<enclosure url="http://content.screencast.com/media/a3e320d5-a0d6-4b3d-8f5a-ea43d20e580f_b878da9d-3d09-46e6-b285-5fc67c71acf3_static_0_0_video.swf" type="application/x-shockwave-flash" length="5717437" />
</item>
/////////////////////fin rss |