Menu

#21 Container with namespace not supported

open
nobody
None
5
2005-05-12
2005-05-12
No

PHP 5.0.4, Magpie 0.71.1

Containers (xml tags with children) in items are not
supported if the container declares a namespace.

For example, this RSS feed:

http://scripts.gamespy.com/rss/gamespy.all.2.0.xml

...causes the following error:

Fatal error: Only variables can be passed by reference
in /var/www/magpierss/rss_parse.inc on line 344

It's due to the <product:product> tag which contains
other tags in the "product" namespace.

A patch against 0.71.1 which allows magpie to handle
this is attached. Please note that I in no way suggest
that the patch is perfect, doesn't break anything else,
works on everyone elses setup, completely fixes the
problem or is the correct solution to the problem. It
could be absolute crap. I can only say it addresses
this particular issue for me and doesn't break anything
else I've thrown at it.

Discussion

  • Jason Brunette

    Jason Brunette - 2005-05-12

    Logged In: YES
    user_id=969666

    I said I attached a patch...

     
  • Jason Brunette

    Jason Brunette - 2005-05-12

    Patch for rss_parse.inc

     
  • Nobody/Anonymous

    Logged In: NO

    Thanks for the patch. I'll take a look at it. Magpie has
    been overdue for a reworking of its namespace handling for a
    couple of years now, but it keeps getting pushed off until
    the next version.

     

Log in to post a comment.