views:

23

answers:

1

Hi

How can a get a object variable from a remote XML file, for example this one ?

In PHP5 it works fine with simplexml_load_file(), but I need this to work in PHP 4 also. How can I do that? Or is there any built-in WordPress function that can load xml files? I tried using the WP's SimplePie class, but I get a weird object variable (with incorectly named fields etc).

+1  A: 

If you want to use the smipleXML functions in PHP4 include this class ( I have used it and it works like a charm) http://www.phpclasses.org/package/4484-PHP-Load-XML-files-in-PHP-4-like-SimpleXML-extension.html

Stewie