Jump to content

Regarding "Handling XML Data" Tutorial


cdn

Recommended Posts

I tried to use the last example on "RSS Feed class".

Do I need any thing special for it to work. When I use it, it takes me to the "Add to Google Reader or Add to Google Homepage" option page. I chose to Add to homepage, then it actually adds a box in my Google Homepage, but inside the box, it says: "Information is temporarily unavailable."

 

Is there anything missing from that tutorial or am I missing something simple?

Any help would be appreciated.

Link to comment
https://forums.phpfreaks.com/topic/119704-regarding-handling-xml-data-tutorial/
Share on other sites

I wasn't sure what you meant by source of outputed XML? I wasn't getting any XML output, the program takes me to my  iGoogle home page (http://www.google.com/ig ), and it actually adds another box at the top left corner, but shows the error message inside the box. On the title bar of the box itself, it displays "http://localhost/rss_feed.php", because that is what you have on line 144 of the code. I can also move that box around just like any other boxes in my iGooogle homepage.

 

What I have done is that I copied the whole code in the section "Creating an RSS feed class" and saved it as rss_feed.php in my http://localhost document folder.

 

Do you have a working sample?

Okay, I think my XML files were setup to be handled by Google. I removed that and now I get the data in the following format:

 

<?xml version="1.0" ?> 
- <rss version="2.0">
- <channel>
  <title>Test RSS Feed</title> 
  <language>en-us</language> 
  <link>http://localhost/rss_feed_phpFreaks.php</link> 
  <description>Test RSS Feed generated using PHP DOM.</description> 
- <item>
  <title>Test entry</title> 
  <link>http://localhost/test.php?item=1</link> 
- <description>
- <![CDATA[ First test item <br /><strong>Testing</strong>
  ]]> 
  </description>
  <pubDate>Tue, 18 Dec 2007 17:00:00 GMT</pubDate> 
  <author>Daniel</author> 
  </item>
...

 

But, for this to be useful, how can make it available to a user so that they can add the RSS feed to their RSS bookmarks. And when they click on the link, it will take them to a page where they can read the information, without seeing any of those XML tags being visible.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.