Re: XML/RSS Weirdness
| From: | Martin Jansen | Date: | Mon, 17 Feb 2003 21:16:14 +0000 |
| Subject: | Re: XML/RSS Weirdness | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13423@lists.php.net to get a copy of this message | ||
On Mon Feb 17, 2003 at 10:4715AM +0200, Yavor Shahpasov wrote:
> am using XML/RSS in the following manner
>
> $rss = new XML_RSS($channel);
> $rss->parse();
> $feeds = $rss->getItems();
>
> at this stage $fedds is an empty array, while the rss file is a valid url
>
> $rss =& new XML_RSS($channel);
> $rss->parse();
> $feeds = $rss->getItems();
>
> doing the above seems to work, can anyone explain why (martin?),
IIRC that's because XML_RSS derives from XML_Parser and in that case the
call by reference is needed to make the *Element() methods, which are
used by the Expat extenion during parsing the XML file, work.
My explanation may be wrong, but I don't have the time to dig into this
deeper at the moment.
--
- Martin Martin Jansen
http://martinjansen.com/