SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Display and Sort rss.xml in HTML page content area

    I am helping to prepare a new website for our church... Currently the Pastors edit the rss.xml to add audio files of their sermons.. Example format:

    <item>
    <title>In Our Own Language</title>
    <description>Pastor Mark: 5/27/2007</description>
    <enclosure url="http://www.bethlehemluth.org/sermonfiles/InOurOwnLanguage.mp3" length="9843328" type="audio/mpeg" />
    <pubDate>Tue, 29 May 2007 19:10:14 GMT</pubDate>
    </item>

    They also make an entry into the html file with a link. Currently these are in earliest to latest order, we also want to put the latest first in the list. (or at least have that option) Example format:

    <li><a href="sermonfiles/TheBigPicture.mp3">The
    Big Picture: 3/6/2005</a></li>

    I would like to save them the pain of doing things twice and provide them a way to just edit the XML file and put the file on the server.

    Option 1
    I could change the xml format (putting the date in a different field) and write a php script to display the same xml file (latest to earliest date) on the html page. I think I could use the simpleXML library functions to do this.... I don't seem to find an option to sort the output however.

    Option 2
    Another consideration might be to use XSLT to format the data, but I can't seem to find out how to embed this in my HTML file.

    Is there an better/easier way to do this? Any suggestions or examples would be greatly appreciated.

    Thanks in advance

  2. #2
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I have the thing thing for you. I just finished writing a whole php/mysql app for this very purpose for my church. I have PM'ed you.


Bookmarks

Posting Permissions

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