Results 1 to 4 of 4

Thread: including rss feeds into a page

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Bronze Member Coffee's Avatar
    Join Date
    Dec 2003
    Posts
    175

    Question Rss

    There are a lot of help files on rss xml scripting. Look up anything from the following below might help...

    file.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xml-tag>
    <child-xml-tag>
    </child-xml-tag>
    </xml-tag>

    script.js
    xmlDoc = document.implementation.createDocument("", "", null);
    xmlDoc.onload = writeList;
    xmlDoc.load("file.xml");

    function writeList()
    {
    var rss = xmlDoc.getElementsByTagName("xml-tag");
    for (j=0; j < rss[i].childNodes.length; j++) {
    rss[i].childNodes[j].text;
    if (rss[i].childNodes[j].nodeName == "#text") {
    alert(rss[i].childNodes[j].nodeValue);
    }
    }



    Trouble for me is that Im using firefox and none of this seems to work. Well i say none of this but a fair amount. cant get any values from childNode(s) pluss childNode doesn't work itself after trying lots of different code just to get this far !!!!

    Can anyone help us please
    Live long and prosper!

  2. #2
    Bronze Member Coffee's Avatar
    Join Date
    Dec 2003
    Posts
    175

    Question Could do this...

    Depends if your wanting to do what im wanting to do and read xml to html but then again if not you could do this...

    <link rel="alternate" type="application/rss+xml" title="Rss" href="rss.xml">

    Puts the ison for Rss into the seach bar !
    Then just create an xml file with <rss version=""></rss> to go with it.

    The trouble I'm having myself though is that it won't show any of the items once i've added it to the bookmarks. Can anyone help me with formatting my XML file please!?
    Live long and prosper!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •