<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: New Feed Parser version</title>
	<atom:link href="http://jystewart.net/process/2005/10/new-feed-parser-version/feed/" rel="self" type="application/rss+xml" />
	<link>http://jystewart.net/process/2005/10/new-feed-parser-version/</link>
	<description>notes from another web developer</description>
	<lastBuildDate>Sat, 24 Jul 2010 07:17:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: James Stewart</title>
		<link>http://jystewart.net/process/2005/10/new-feed-parser-version/comment-page-1/#comment-429</link>
		<dc:creator>James Stewart</dc:creator>
		<pubDate>Sun, 23 Oct 2005 04:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/10/new-feed-parser-version/#comment-429</guid>
		<description>Where the file_get_contents() sits is not going to change whether or not the feed parser throws an error, but you&#039;re right that it should be checking for empty/non-XML input and throwing an exception in that case. That will be in the next version.

As to the fatal error, this package deliberately does not provide HTTP functionality. How you retrieve the feed is your business and not something that will be addressed here. The example I offer is a very simple one as I am demonstrating the parser, not feed fetching. Obviously in production environments I use much more robust approaches.</description>
		<content:encoded><![CDATA[<p>Where the file_get_contents() sits is not going to change whether or not the feed parser throws an error, but you&#8217;re right that it should be checking for empty/non-XML input and throwing an exception in that case. That will be in the next version.</p>
<p>As to the fatal error, this package deliberately does not provide HTTP functionality. How you retrieve the feed is your business and not something that will be addressed here. The example I offer is a very simple one as I am demonstrating the parser, not feed fetching. Obviously in production environments I use much more robust approaches.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pcdinh</title>
		<link>http://jystewart.net/process/2005/10/new-feed-parser-version/comment-page-1/#comment-428</link>
		<dc:creator>pcdinh</dc:creator>
		<pubDate>Sun, 23 Oct 2005 04:37:05 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/10/new-feed-parser-version/#comment-428</guid>
		<description>I just upgraded XML_Feed_Parser to version 0.26 and am happy to find that the exception has been improved. I have tested it with Atom 0.3: http://b2evolution.net/xmlsrv/atom.php?blog=7

I changed my script a bit ( put $feed_xml = file_get_contents($feedFile); into the try.. catch block) with a hope that an exception will be thrown when it is instructed to parse a non-existent feed or not-a-feed XML/HTML file but it seems that these problems has not been covered yet. 

Besides, an fatal error (not an exception) will occur if the connection fails, a website on and up but it is behind a firewall. 

Thanks and best regards,

Dinh</description>
		<content:encoded><![CDATA[<p>I just upgraded XML_Feed_Parser to version 0.26 and am happy to find that the exception has been improved. I have tested it with Atom 0.3: <a href="http://b2evolution.net/xmlsrv/atom.php?blog=7" rel="nofollow">http://b2evolution.net/xmlsrv/atom.php?blog=7</a></p>
<p>I changed my script a bit ( put $feed_xml = file_get_contents($feedFile); into the try.. catch block) with a hope that an exception will be thrown when it is instructed to parse a non-existent feed or not-a-feed XML/HTML file but it seems that these problems has not been covered yet. </p>
<p>Besides, an fatal error (not an exception) will occur if the connection fails, a website on and up but it is behind a firewall. </p>
<p>Thanks and best regards,</p>
<p>Dinh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Stewart</title>
		<link>http://jystewart.net/process/2005/10/new-feed-parser-version/comment-page-1/#comment-427</link>
		<dc:creator>James Stewart</dc:creator>
		<pubDate>Sat, 22 Oct 2005 17:44:38 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/10/new-feed-parser-version/#comment-427</guid>
		<description>Ah. There is indeed a bug whereby the main parser class doesn&#039;t throw an exception if the feed type is a version of RSS that is not supported. That is fixed in CVS (I&#039;ve also added 0.91 and 0.92 support to CVS) and will be resolved in the next version (which I hope to get out this weekend).</description>
		<content:encoded><![CDATA[<p>Ah. There is indeed a bug whereby the main parser class doesn&#8217;t throw an exception if the feed type is a version of RSS that is not supported. That is fixed in CVS (I&#8217;ve also added 0.91 and 0.92 support to CVS) and will be resolved in the next version (which I hope to get out this weekend).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Stewart</title>
		<link>http://jystewart.net/process/2005/10/new-feed-parser-version/comment-page-1/#comment-424</link>
		<dc:creator>James Stewart</dc:creator>
		<pubDate>Sat, 22 Oct 2005 02:46:42 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/10/new-feed-parser-version/#comment-424</guid>
		<description>Um. It&#039;s supposed to throw an exception if it doesn&#039;t recognise the feed type, hence using the try {} catch {} block in the example. And the package doesn&#039;t ever return &#039;pages&#039; -- it&#039;s the job of your code to turn its results into a page (or whatever else you want to produce)

If it&#039;s not throwing an exception, that&#039;s a bug. If it&#039;s timing out then that&#039;s probably a bug too.</description>
		<content:encoded><![CDATA[<p>Um. It&#8217;s supposed to throw an exception if it doesn&#8217;t recognise the feed type, hence using the try {} catch {} block in the example. And the package doesn&#8217;t ever return &#8216;pages&#8217; &#8212; it&#8217;s the job of your code to turn its results into a page (or whatever else you want to produce)</p>
<p>If it&#8217;s not throwing an exception, that&#8217;s a bug. If it&#8217;s timing out then that&#8217;s probably a bug too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pcdinh</title>
		<link>http://jystewart.net/process/2005/10/new-feed-parser-version/comment-page-1/#comment-423</link>
		<dc:creator>pcdinh</dc:creator>
		<pubDate>Sat, 22 Oct 2005 02:35:48 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/10/new-feed-parser-version/#comment-423</guid>
		<description>Hello James,

Do you think that XML_Feed_Parser should throw a exception in case a user tries to parse an unsupported XML Format such as RSS 0.92. The current version of XML_Feed_Parser return a blank page so users can be confused: the feed has nothing to display or the parser can not get the information.

I dont think this is a bug but a RFE. Please correct me if I am wrong.

Thanks and best regards

Dinh
http://www.goldenkey.edu.vn/en</description>
		<content:encoded><![CDATA[<p>Hello James,</p>
<p>Do you think that XML_Feed_Parser should throw a exception in case a user tries to parse an unsupported XML Format such as RSS 0.92. The current version of XML_Feed_Parser return a blank page so users can be confused: the feed has nothing to display or the parser can not get the information.</p>
<p>I dont think this is a bug but a RFE. Please correct me if I am wrong.</p>
<p>Thanks and best regards</p>
<p>Dinh<br />
<a href="http://www.goldenkey.edu.vn/en" rel="nofollow">http://www.goldenkey.edu.vn/en</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Stewart</title>
		<link>http://jystewart.net/process/2005/10/new-feed-parser-version/comment-page-1/#comment-422</link>
		<dc:creator>James Stewart</dc:creator>
		<pubDate>Fri, 21 Oct 2005 22:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/10/new-feed-parser-version/#comment-422</guid>
		<description>That&#039;s defined in your php.ini file. You&#039;ll need to change the &#039;max_execution_time&#039; directive.

Are you sure that the problem was with the parser and not with code fetching the feed? If so, please file a bug report through the PEAR website. There&#039;s a link from http://pear.php.net/package/XML_Feed_Parser to the bugs system.</description>
		<content:encoded><![CDATA[<p>That&#8217;s defined in your php.ini file. You&#8217;ll need to change the &#8216;max_execution_time&#8217; directive.</p>
<p>Are you sure that the problem was with the parser and not with code fetching the feed? If so, please file a bug report through the PEAR website. There&#8217;s a link from <a href="http://pear.php.net/package/XML_Feed_Parser" rel="nofollow">http://pear.php.net/package/XML_Feed_Parser</a> to the bugs system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pcdinh</title>
		<link>http://jystewart.net/process/2005/10/new-feed-parser-version/comment-page-1/#comment-421</link>
		<dc:creator>pcdinh</dc:creator>
		<pubDate>Fri, 21 Oct 2005 16:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/10/new-feed-parser-version/#comment-421</guid>
		<description>I have tried your example several times and got an error when parsing http://www.bytefx.com/blog/SyndicationService.asmx/GetRssCategory?categoryName=MySQL 

The error is displayed as follows:

Fatal error: Maximum execution time of 30 seconds exceeded in C:\server\webroot\phplearning\XML_Feed_Parser.php on line 23

Is there is any way to reset that default time out setting?

Thanks a lot.

Dinh
http://www.goldenkey.edu.vn/en</description>
		<content:encoded><![CDATA[<p>I have tried your example several times and got an error when parsing <a href="http://www.bytefx.com/blog/SyndicationService.asmx/GetRssCategory?categoryName=MySQL" rel="nofollow">http://www.bytefx.com/blog/SyndicationService.asmx/GetRssCategory?categoryName=MySQL</a> </p>
<p>The error is displayed as follows:</p>
<p>Fatal error: Maximum execution time of 30 seconds exceeded in C:\server\webroot\phplearning\XML_Feed_Parser.php on line 23</p>
<p>Is there is any way to reset that default time out setting?</p>
<p>Thanks a lot.</p>
<p>Dinh<br />
<a href="http://www.goldenkey.edu.vn/en" rel="nofollow">http://www.goldenkey.edu.vn/en</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Stewart</title>
		<link>http://jystewart.net/process/2005/10/new-feed-parser-version/comment-page-1/#comment-420</link>
		<dc:creator>James Stewart</dc:creator>
		<pubDate>Fri, 21 Oct 2005 14:28:55 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/10/new-feed-parser-version/#comment-420</guid>
		<description>Thanks for the examples. Both of the Hungarian examples (marked &#039;unsuccessful&#039;) are actually RSS 0.92 which is not supported by the parser at present. I had been hoping not to have to support versions of RSS </description>
		<content:encoded><![CDATA[<p>Thanks for the examples. Both of the Hungarian examples (marked &#8216;unsuccessful&#8217;) are actually RSS 0.92 which is not supported by the parser at present. I had been hoping not to have to support versions of RSS</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pcdinh</title>
		<link>http://jystewart.net/process/2005/10/new-feed-parser-version/comment-page-1/#comment-419</link>
		<dc:creator>pcdinh</dc:creator>
		<pubDate>Fri, 21 Oct 2005 12:37:46 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/10/new-feed-parser-version/#comment-419</guid>
		<description>More feeds to test: 

Successful: http://spaces.msn.com/members/wudicgi/feed.rss (Chinese on MSN blog)
                 http://spaces.msn.com/members/leonidlukin/feed.rss (Russian)

Unsuccessful: http://weblabor.hu/rss/hozzaszolas/hirek/20051008/phpkapcsolat (Hungary utf-8)
                    http://weblabor.hu/rss/hozzaszolas/hirek/20051008/phpkapcsolat?encoding=iso-8859-2

Not an easy success: http://www.proustcafe.com/index.xml (RSS 2.0 UTF-8 but some characters are displayed as squares.</description>
		<content:encoded><![CDATA[<p>More feeds to test: </p>
<p>Successful: <a href="http://spaces.msn.com/members/wudicgi/feed.rss" rel="nofollow">http://spaces.msn.com/members/wudicgi/feed.rss</a> (Chinese on MSN blog)<br />
                 <a href="http://spaces.msn.com/members/leonidlukin/feed.rss" rel="nofollow">http://spaces.msn.com/members/leonidlukin/feed.rss</a> (Russian)</p>
<p>Unsuccessful: <a href="http://weblabor.hu/rss/hozzaszolas/hirek/20051008/phpkapcsolat" rel="nofollow">http://weblabor.hu/rss/hozzaszolas/hirek/20051008/phpkapcsolat</a> (Hungary utf-8)<br />
                    <a href="http://weblabor.hu/rss/hozzaszolas/hirek/20051008/phpkapcsolat?encoding=iso-8859-2" rel="nofollow">http://weblabor.hu/rss/hozzaszolas/hirek/20051008/phpkapcsolat?encoding=iso-8859-2</a></p>
<p>Not an easy success: <a href="http://www.proustcafe.com/index.xml" rel="nofollow">http://www.proustcafe.com/index.xml</a> (RSS 2.0 UTF-8 but some characters are displayed as squares.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pcdinh</title>
		<link>http://jystewart.net/process/2005/10/new-feed-parser-version/comment-page-1/#comment-418</link>
		<dc:creator>pcdinh</dc:creator>
		<pubDate>Fri, 21 Oct 2005 12:17:57 +0000</pubDate>
		<guid isPermaLink="false">http://jystewart.net/process/archives/2005/10/new-feed-parser-version/#comment-418</guid>
		<description>Your example is great. It works with my blog feed: http://www.phpvietnam.net/blog/index.php/feed/ (unicode - utf-8)

Thank you very much and I will keep your solution in mind whenever I need a XML Parsing Library for PHP 5.

Dinh
http://www.goldenkey.edu.vn/en</description>
		<content:encoded><![CDATA[<p>Your example is great. It works with my blog feed: <a href="http://www.phpvietnam.net/blog/index.php/feed/" rel="nofollow">http://www.phpvietnam.net/blog/index.php/feed/</a> (unicode &#8211; utf-8)</p>
<p>Thank you very much and I will keep your solution in mind whenever I need a XML Parsing Library for PHP 5.</p>
<p>Dinh<br />
<a href="http://www.goldenkey.edu.vn/en" rel="nofollow">http://www.goldenkey.edu.vn/en</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
