IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

HTML Discussion :

Flux RSS en bandeau defilant


Sujet :

HTML

  1. #1
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    142
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2012
    Messages : 142
    Points : 125
    Points
    125
    Par défaut Flux RSS en bandeau defilant
    Bonjour est il possible d'afficher un bandeau defilant contenant un flux RSS d'actualité type BFM TV en utilisant HTML5 ?

  2. #2
    Membre confirmé Avatar de 01001111
    Homme Profil pro
    Développeur Web
    Inscrit en
    Janvier 2009
    Messages
    319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Loire (Auvergne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Janvier 2009
    Messages : 319
    Points : 509
    Points
    509
    Par défaut
    Oui, mais pour organiser la mise en page depuis le parsing du fichier xml, il faut soit utiliser un langage serveur comme php, ruby ou dotnet (C#), ou si l'affichage peut ou doit se faire de manière asynchrone, charger le fichier via une requête xmlHttpRequest et le parser puis afficher la nouvelle mise en page dans un conteneur via javascript dans ce cas.
    0x4F

  3. #3
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    142
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2012
    Messages : 142
    Points : 125
    Points
    125
    Par défaut
    Mon fichier doit être en .html donc pas de php de plus si je n'ai pas de connexion internet je dois quand même afficher quelque chose (comme un cache), afficher le flux rss mais pas actualisé

  4. #4
    Invité
    Invité(e)
    Dernière modification par Invité ; 01/10/2015 à 13h10.

  5. #5
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    142
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2012
    Messages : 142
    Points : 125
    Points
    125
    Par défaut
    Jreaux62, j'ai essayé quelque chose grâce à ton message mais ça ne fonctionne pas.

    Vpoila ce que j'ai fait:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    <!DOCTYPE html>
    <html>
    <head>
    	<title></title>
    	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" ></script>
    	<script type="text/javascript">
     
    $(document).ready(  
     function()
     {
       $.ajax( {
                type: "GET",
                url: "http://www.neoscreen.fr/meteo/rss/france.xml",
                dataType: "xml",
                success: function(xml) 
                         {
                           $(xml).find('item').each(   
                             function()
                             {
                                var brief = $(this).find('title').text();
                                 $('<div class="items" ></div>').html('<span>' + title + '</span>').appendTo('#Div_XML');
                               
                              });
                          }
            });
      }
    );
                                    
      </script>          
    </head>
    <body>
        <div id="Div_XML"></div>
    </body>  
    </html>
    Et voila mon xml:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    This XML file does not appear to have any style information associated with it. The document tree is shown below.
    <rss version="2.0">
    <channel>
    <lastBuildDate>Tue, 29 Sep 2015 17:01:23 GMT</lastBuildDate>
    <item>
    <category>FRANCE</category>
    <title>
    Marseille : une élue condamnée pour avoir refusé de célébrer un mariage gay
    </title>
    <link>
    http://www.france24.com/fr/20150929-marseille-elue-condamnee-sursis-refuse-celebrer-mariage-gay-homosexuel
    </link>
    <description>
    Une élue marseillaise a été condamnée pour la première fois en France mardi à cinq mois de prison avec sursis pour discrimination, après avoir refusé de célébrer un mariage entre deux femmes.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/Sabrina%20Hout%20m.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/Sabrina%20Hout%20m.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">A33D47C9-9CF2-45C7-9543-6895CDF661E2</guid>
    <pubDate>Tue, 29 Sep 2015 17:01:23 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/Sabrina%20Hout%20m.jpg">Anne-Christine Poujoulat, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>...</item>
    <item>...</item>
    <item>...</item>
    <item>...</item>
    <item>
    <category>FRANCE</category>
    <title>
    Premières frappes françaises en Syrie, Hollande évoque la "légitime défense"
    </title>
    <link>
    http://www.france24.com/fr/20150927-france-premieres-frappes-aeriennes-syrie-etat-islamique-rafale
    </link>
    <description>
    La France a détruit un camp d'entraînement de l'organisation de l'État islamique, situé dans l'est de la Syrie, a annoncé dimanche François Hollande. Il s'agit des premières frappes aériennes françaises en Syrie.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/27092015_hollande_onu_afp-m.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/27092015_hollande_onu_afp-m.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">717420C7-29C1-4D63-8C53-70C09F1F210D</guid>
    <pubDate>Sun, 27 Sep 2015 06:50:11 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/27092015_hollande_onu_afp-m.jpg">Alain Jocard, Pool, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>MÉDIAS</category>
    <title>
    L'urgentiste Patrick Pelloux annonce à son tour son départ de "Charlie Hebdo"
    </title>
    <link>
    http://www.france24.com/fr/20150926-charlie-hebdo-urgentiste-patrick-pelloux-depart-luz-attentat-paris
    </link>
    <description>
    L'urgentiste Patrick Pelloux a affirmé qu'il cesserait en janvier sa collaboration avec l'hebdomadaire satirique "Charlie Hebdo", estimant que "quelque chose [était] terminé" et qu'il fallait "savoir tourner la page".
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/CharlieHebdo-PatrickPelloux-Depart.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/CharlieHebdo-PatrickPelloux-Depart.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">96148148-A413-4AA2-BFCF-B48D3902DA03</guid>
    <pubDate>Sat, 26 Sep 2015 10:31:55 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/CharlieHebdo-PatrickPelloux-Depart.jpg">Thomas Samson, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>FRANCE</category>
    <title>
    Valls : la France n'accueillera pas plus de 30 000 demandeurs d'asile
    </title>
    <link>
    http://www.france24.com/fr/20150924-premier-ministre-manuel-valls-france-pas-plus-30000-demandeurs-asile-syrie
    </link>
    <description>
    La France n'accueillera pas plus de 30 000 demandeurs d'asile, selon le Premier ministre Manuel Valls, qui était jeudi l'invité de l'émission "Des paroles et des actes" sur France 2.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/Valls-AFP-Eric-Feferberg_0.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/Valls-AFP-Eric-Feferberg_0.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">F485C15F-F3AE-4B4A-B65F-866C1C098856</guid>
    <pubDate>Thu, 24 Sep 2015 20:38:58 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/Valls-AFP-Eric-Feferberg_0.jpg">Eric Feferberg, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>FRANCE</category>
    <title>
    La France propose 80 millions aux Rothschild pour un Rembrandt
    </title>
    <link>
    http://www.france24.com/fr/20150924-france-80-millions-tableau-portrait-rembrandt-rothschild-louvre-pays-bas
    </link>
    <description>
    La France est prête à acquérir un tableau de Rembrandt pour 80 millions d'euros, a annoncé jeudi le ministère de la Culture. Les propriétaires, la famille Rothschild, pourraient vendre un second tableau du maître aux Pays-Bas.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/rembrandt-france-m.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/rembrandt-france-m.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">77F530C6-E69C-4485-86C9-053E4838A3F7</guid>
    <pubDate>Thu, 24 Sep 2015 20:04:21 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/rembrandt-france-m.jpg">© WikiMedia Commons</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>FRANCE</category>
    <title>Le chômage augmente de 0,6 % en août</title>
    <link>
    http://www.france24.com/fr/20150924-chomage-nouveau-record-france-aout-emploi-khomri
    </link>
    <description>
    La hausse est légère mais il s'agit tout de même d'un record : avec 20 000 demandeurs d'emploi en plus (+ 0,6 %) par rapport au mois de juillet, le chômage n'a jamais été aussi important qu'au mois d'août 2015 en France.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/Chomage-Philippe-Huguen.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/Chomage-Philippe-Huguen.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">C38F53E4-CACB-404A-A0F2-A3FFBC0328BF</guid>
    <pubDate>Thu, 24 Sep 2015 17:12:16 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/Chomage-Philippe-Huguen.jpg">Philippe Huguen, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>FRANCE</category>
    <title>
    Le Conseil constitutionnel confirme l'illégalité d'UberPop
    </title>
    <link>
    http://www.france24.com/fr/20150922-conseil-constitutionnel-confirme-interdiction-uberpop-transports-france-uber
    </link>
    <description>
    Le Conseil constitutionnel a confirmé l'interdiction du service UberPop, enterrant les espoirs de la firme américaine Uber de réactiver en France son service de mise en relation entre chauffeurs amateurs et particuliers.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/22092015-uberPOP.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/22092015-uberPOP.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">6AAAC6EA-2B49-484C-B3C1-DF520B933D42</guid>
    <pubDate>Tue, 22 Sep 2015 17:44:55 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/22092015-uberPOP.jpg">Thomas Oliva, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>JUSTICE</category>
    <title>
    Prière de rue et "Occupation nazie" : Marine Le Pen renvoyée en correctionnelle
    </title>
    <link>
    http://www.france24.com/fr/20150922-priere-rue-occupation-nazie-marine-le-pen-tribunal-justice-islam-provocation-discrimination
    </link>
    <description>
    La présidente du Front national est renvoyée en correctionnelle à Lyon pour ses déclarations sur les prières de rue musulmanes comparées à l'Occupation nazie. Le procès aura lieu le 20 octobre.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/22092015-marine-le-pen.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/22092015-marine-le-pen.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">2A5EDA1B-8D71-4634-9DDB-E7F84E410559</guid>
    <pubDate>Tue, 22 Sep 2015 16:13:17 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/22092015-marine-le-pen.jpg">Jean-François Monier, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>FRANCE</category>
    <title>
    SNCF : les chibanis discriminés "ont obtenu réparation sur le plan moral"
    </title>
    <link>
    http://www.france24.com/fr/20150921-france-sncf-discrimines-chibanis-maroc-condmanation-prud-hommes
    </link>
    <description>
    La SNCF a été condamnée lundi pour discrimination envers plusieurs centaines de chibanis marocains embauchés au début des années 1970. Un verdict salué par leur avocate qui évoque une "réparation avant tout morale".
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/verdict%20sncf.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/verdict%20sncf.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">D0E0866D-AFD7-4227-8D1E-F69302F3188C</guid>
    <pubDate>Mon, 21 Sep 2015 14:44:51 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/verdict%20sncf.jpg">Capture d'écran</source>
    <author>Amara MAKHOUL-YATIM</author>
    </item>
    <item>
    <category>FRANCE</category>
    <title>
    La SNCF condamnée pour discrimination envers des centaines de chibanis marocains
    </title>
    <link>
    http://www.france24.com/fr/20150921-sncf-chibani-condamnee-discrimination-cheminots-justice-marocains-prudhomme
    </link>
    <description>
    La SNCF a été condamnée lundi pour discrimination envers plusieurs centaines de chibanis marocains embauchés au début des années 1970. La société française "se laisse le temps de l'analyse avant de faire éventuellement appel".
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/SNCF-Justice-Chibanis.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/SNCF-Justice-Chibanis.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">9F8AA715-8EBF-4156-9816-8DDB1C58B542</guid>
    <pubDate>Mon, 21 Sep 2015 08:42:04 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/SNCF-Justice-Chibanis.jpg">Loïc Venance, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>FRANCE</category>
    <title>
    Attaque du Thalys : les agents ont répondu "au mieux" à la situation
    </title>
    <link>
    http://www.france24.com/fr/20150918-attaque-thalys-agents-repondu-mieux-a-situation-ayoub-el-khazzani-jean-hugues-anglade
    </link>
    <description>
    Selon une enquête interne, les agents du Thalys ont répondu "au mieux à une situation sans précédent", lors de l'attaque du 21 août dernier. La filiale de la SNCF préconise toutefois un renforcement de la formation des agents aux situations de crise.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/18092015-thalys-train-attac.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/18092015-thalys-train-attac.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">A70165AD-08C8-474E-BCB2-F8FDF7BCE60D</guid>
    <pubDate>Fri, 18 Sep 2015 17:23:42 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/18092015-thalys-train-attac.jpg">Philippe Huguen, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>CRISE MIGRATOIRE</category>
    <title>
    Manuel Valls appelle la Hongrie à plus d'"humanité" avec les migrants
    </title>
    <link>
    http://www.france24.com/fr/20150918-manuel-valls-hongrie-humanite-migrants-suede-barbeles-orban-frontieres-ue
    </link>
    <description>
    Interrogé sur la manière dont la Hongrie fait face au flux de migrants, Manuel Valls, en déplacement en Suède, a réprouvé l'"attitude" et les "propos" de Budapest et appelé les responsables hongrois à plus d'"humanité".
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/vall-suede-conf-m.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/vall-suede-conf-m.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">995DB081-D811-4315-BA09-222ABFE54DBD</guid>
    <pubDate>Fri, 18 Sep 2015 15:47:22 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/vall-suede-conf-m.jpg">Jonathan Nackstrand, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>SPORT</category>
    <title>
    Équipe de France de tennis : Arnaud Clément débarqué, Noah attendu
    </title>
    <link>
    http://www.france24.com/fr/20150918-equipe-france-tennis-arnaud-clement-debarque-yannick-noah-attendu-coupe-davis
    </link>
    <description>
    Après l'échec des Bleus en quarts de finale de la Coupe Davis, Arnaud Clément a été démis de ses fonctions de capitaine de l'équipe de France de tennis. Pour le remplacer, le nom de Yannick Noah est sur toutes les lèvres.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/2015-09-18-clement.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/2015-09-18-clement.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">A897C81A-6955-4021-B0B6-041F3F5657F7</guid>
    <pubDate>Fri, 18 Sep 2015 14:23:58 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/2015-09-18-clement.jpg">Jean-Sébastien Évrard, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>FRANCE</category>
    <title>
    Un Français arrêté en août projetait de commettre un attentat lors d'un concert
    </title>
    <link>
    http://www.france24.com/fr/20150918-jihadiste-francais-arrestation-aout-attentat-salle-concert-paris-etat-islamique
    </link>
    <description>
    Un Français, qui a brièvement séjourné dans les rangs jihadistes en Syrie, a été arrêté en août, a-t-on appris vendredi de source policière. Il dit avoir reçu la consigne de mener un attentat lors d'un concert en France.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/18092015_police-afp-m_0.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/18092015_police-afp-m_0.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">D7203274-A14E-4D73-B940-02AD165C8F86</guid>
    <pubDate>Fri, 18 Sep 2015 10:55:14 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/18092015_police-afp-m_0.jpg">Loïc Venance, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <item>
    <category>FRANCE</category>
    <title>
    La Sorbonne offre l’asile aux étudiants réfugiés avec le soutien financier du Qatar
    </title>
    <link>
    http://www.france24.com/fr/20150917-sorbonne-qatar-etudiants-refugies-pantheon-universite-paris-syrie
    </link>
    <description>
    À défaut d’ouvrir grand ses portes aux Syriens fuyant les affres de la guerre, le Qatar va financer l'accueil d'une centaine d’étudiants réfugiés à l’Université Paris 1 – Panthéon- Sorbonne.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/sorbonne-m.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/sorbonne-m.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">B8EF386F-7771-4FD9-928A-E3AA03FC116A</guid>
    <pubDate>Thu, 17 Sep 2015 15:17:01 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/sorbonne-m.jpg">Loïc Venance, AFP</source>
    <author>Marc DAOU</author>
    </item>
    <item>
    <category>CRISE MIGRATOIRE</category>
    <title>
    Migrants : à Paris, deux campements évacués sans heurts
    </title>
    <link>
    http://www.france24.com/fr/20150917-france-paris-migrants-camps-austerlitz-mairie-xviiie-evacues-douceur-refugies
    </link>
    <description>
    Les campements de migrants de la gare d’Austerlitz et de la mairie du XVIIIe, à Paris, ont été évacués jeudi sans incident, lors d’une opération de "mise à l’abri". Les occupants de ces sites vont être relogés dans des centres d’hébergement.
    </description>
    <thumbnail xmlns="http://search.yahoo.com/mrss/" url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/170915-Migrants-Paris-Austerlitz.jpeg.jpg"/>
    <enclosure url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/170915-Migrants-Paris-Austerlitz.jpeg.jpg" type="image/jpg" length="0"/>
    <guid isPermaLink="false">7EC94E43-8039-4282-8D06-06F4F43C7A27</guid>
    <pubDate>Thu, 17 Sep 2015 08:17:15 GMT</pubDate>
    <source url="http://scd.france24.com/fr/files_fr/imagecache/france24_ct_api_medium2/article/image/170915-Migrants-Paris-Austerlitz.jpeg.jpg">KenzoTribouillard, AFP</source>
    <author>FRANCE 24</author>
    </item>
    <title>
    France – France 24 - L’Actualité Internationale 24h/24
    </title>
    <link>http://www.france24.com/fr/france/rss</link>
    <image>
    <link>http://www.france24.com/fr/</link>
    <title>France 24</title>
    <url>
    http://www.france24.com/bundles/aefhermesf24/img/france24-logo.png?version=20150917142649
    </url>
    </image>
    </channel>
    </rss>

  6. #6
    Invité
    Invité(e)
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    $(document).ready(function(){
       $.ajax( {
    		type: "GET",
    		url: "rss.xml",
    		dataType: "xml",
    		success: function(xml) 
    		{
    		   $(xml).find('item').each( function(){
    				var title = $(this).find('title').text();
    				var link = $(this).find('link').text();
    				$('<div class="items"></div>').html('<a href="' + link + '">' + title + '</a>').appendTo('#Div_XML');
    			});
    		}
    	});
    });

  7. #7
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    142
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2012
    Messages : 142
    Points : 125
    Points
    125
    Par défaut
    Ca ne fonctionne toujours pas, je ne vois pas ou est mon erreur

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    <!DOCTYPE html>
    <html>
    <head>
    	<title></title>
    	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" ></script>
    	<script type="text/javascript">
     
    $(document).ready(function(){
       $.ajax( {
                    type: "GET",
                    url: "http://www.neoscreen.fr/meteo/rss/france.xml",
                    dataType: "xml",
                    success: function(xml) 
                    {
                       $(xml).find('item').each( function(){
                                    var title = $(this).find('title').text();
                                    var link = $(this).find('link').text();
                                    $('<div class="items"></div>').html('<a href="' + link + '">' + title + '</a>').appendTo('#Div_XML');
                            });
                    }
            });
    });
                                    
      </script>          
    </head>
    <body>
        <div id="Div_XML"></div>
    </body>  
    </html>

  8. #8
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    142
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2012
    Messages : 142
    Points : 125
    Points
    125
    Par défaut
    En fait sa fonctionne si je met mon xml en local mais des que je pointe l'adresse http ou se trouve le xml, la ça ne fonctionne plus. Comment faire ?

  9. #9
    Membre confirmé Avatar de 01001111
    Homme Profil pro
    Développeur Web
    Inscrit en
    Janvier 2009
    Messages
    319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Loire (Auvergne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Janvier 2009
    Messages : 319
    Points : 509
    Points
    509
    Par défaut
    Il n'y aurait pas un problème de restrictions de la police de sécurité, du au fait que tu appelles un contenu exterieur?
    avec un header x-frame-options:ALLOW-FROM domaine.tld ou x-frame-options:GOFORIT on peut faire un override.
    0x4F

  10. #10
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    142
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2012
    Messages : 142
    Points : 125
    Points
    125
    Par défaut
    OUH la ^^ je n'ai jamais entendu parler de ça ! =)
    Comment intégrer ce "truc" ^^ ? dans un meta ?

  11. #11
    Membre confirmé Avatar de 01001111
    Homme Profil pro
    Développeur Web
    Inscrit en
    Janvier 2009
    Messages
    319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Loire (Auvergne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Janvier 2009
    Messages : 319
    Points : 509
    Points
    509
    Par défaut
    Je viens voir que x-frame-options est en cours de dépréciation... En plus apparemment ça ne controle que les contenus affichés dans une frame, iframe ou object, à moins que je me trompe.
    il y a aussi Content-Security-Policy mais ce dernier ne semblait pas être géré par IE au moment où le post sur lequel je l'ai vu a été posté.
    Peut-être:
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    <meta http-equiv="Content-Security-Policy" content="connect-src 'http://www.neoscreen.fr/'">

    le xml est bien sur un autre serveur que l'application web, tu le confirmes?
    0x4F

  12. #12
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    142
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2012
    Messages : 142
    Points : 125
    Points
    125
    Par défaut
    Toujours pas, à moins que je le fais mal

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    <!DOCTYPE html>
    <html>
    <head>
    	<title></title>
    	<meta http-equiv="Content-Security-Policy" content="connect-src 'http://www.neoscreen.fr/'">
    	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" ></script>
    	<script type="text/javascript">
     
    $(document).ready(function(){
       $.ajax( {
                    type: "GET",
                    url: "http://www.neoscreen.fr/meteo/rss/france.xml",
                    dataType: "xml",
                    success: function(xml) 
                    {
                       $(xml).find('item').each( function(){
                                    var title = $(this).find('title').text();
                                    var link = $(this).find('link').text();
                                    $('<div class="items"></div>').html('<a href="' + link + '">' + title + '</a>').appendTo('#Div_XML');
                            });
                    }
            });
    });
                                    
      </script>          
    </head>
    <body>
        <div id="Div_XML"></div>
    </body>  
    </html>

  13. #13
    Membre confirmé Avatar de 01001111
    Homme Profil pro
    Développeur Web
    Inscrit en
    Janvier 2009
    Messages
    319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Loire (Auvergne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Janvier 2009
    Messages : 319
    Points : 509
    Points
    509
    Par défaut
    tu as quoi dans la console? jquery est bien chargé aussi?
    0x4F

  14. #14
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    142
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2012
    Messages : 142
    Points : 125
    Points
    125
    Par défaut
    Voila ce que me retourne la console

    The source list for Content Security Policy directive 'connect-src' contains an invalid source: ''http://www.neoscreen.fr/''. It will be ignored.
    index.html:10 jQuery est prêt !
    jquery.min.js:127 Refused to connect to 'http://www.neoscreen.fr/meteo/rss/france.xml' because it violates the following Content Security Policy directive: "connect-src 'http://www.neoscreen.fr/'".
    c.extend.ajax @ jquery.min.js:127
    jquery.min.js:127 Uncaught SecurityError: Failed to execute 'open' on 'XMLHttpRequest': Refused to connect to 'http://www.neoscreen.fr/meteo/rss/france.xml' because it violates the document's Content Security Policy.

  15. #15
    Membre confirmé Avatar de 01001111
    Homme Profil pro
    Développeur Web
    Inscrit en
    Janvier 2009
    Messages
    319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Loire (Auvergne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Janvier 2009
    Messages : 319
    Points : 509
    Points
    509
    Par défaut
    essaie de mettre toute l'url après connect-src:
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    <meta http-equiv="Content-Security-Policy" content="content-src 'http://www.neoscreen.fr/meteo/rss/france.xml'">
    car je vois que http://www.neoscreen.fr/ renvoie un 403
    0x4F

  16. #16
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    142
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2012
    Messages : 142
    Points : 125
    Points
    125
    Par défaut
    Unrecognized Content-Security-Policy directive 'content-src'.

    index.html:10 jQuery est prêt !
    index.html:1 XMLHttpRequest cannot load http://www.neoscreen.fr/meteo/rss/france.xml. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.

  17. #17
    Membre confirmé Avatar de 01001111
    Homme Profil pro
    Développeur Web
    Inscrit en
    Janvier 2009
    Messages
    319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Loire (Auvergne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Janvier 2009
    Messages : 319
    Points : 509
    Points
    509
    Par défaut
    Tu es peut-être sur un mutualisé qui ne l'autorise pas
    essaie un htaccess
    0x4F

  18. #18
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    142
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2012
    Messages : 142
    Points : 125
    Points
    125
    Par défaut
    jQuery est prêt !
    index.html:1 XMLHttpRequest cannot load http://www.neoscreen.fr/meteo/rss/france.xml. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.

  19. #19
    Membre confirmé Avatar de 01001111
    Homme Profil pro
    Développeur Web
    Inscrit en
    Janvier 2009
    Messages
    319
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Loire (Auvergne)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Janvier 2009
    Messages : 319
    Points : 509
    Points
    509
    Par défaut
    j'ai corrigé mon post:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
    à mettre à la racine de l'hébergement ciblé par la requête jquery dans un fichier nommé .htaccess et si le serveur est un apache

    Si tu n'y as pas accès, c'est que tu n'as pas le droit de faire ceci malheureusement.
    0x4F

  20. #20
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Avril 2012
    Messages
    142
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2012
    Messages : 142
    Points : 125
    Points
    125
    Par défaut
    Ca doit venir d'autre chose car même en mettant un flux rss de France24 j'ai le meme soucis

Discussions similaires

  1. Flux RSS
    Par Fabouney dans le forum XML/XSL et SOAP
    Réponses: 2
    Dernier message: 05/06/2005, 13h14

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo