wordpress itself I believe uses Magpie for parsing things like RSS feeds, while I steer people toward my CG-FeedRead solution if they want something lighter-weight.
FeedRead uses quick-n-dirty hand-crafted parsing, leveraging early PHP extensions. I’m not sure, but I thought magpie maybe used the DOM XML parser (another PHP extension) — certainly I have seen a number of people use xtree or other compiled traversals.
All depends on what you want to do, how ‘heavy a load’ you want for doing it, and how much extra code you want to write. 😉
-d
That presumes PHP5 (which still isn’t widespread), and that you know the construction of the XML. Which is why it’d be good to find out what XML is he looking to parse. 😉
Thanks for the responses. While SimpleXML would be a great solution, like davidchait said, that would make my plugin unusable for people not running PHP 5.
If WordPress uses Magpie, then that’s great. But I need to know the names of the XML functions and their API. If I knew which include file the functions were defined it, I could look into it myself.
Thanks!
– Sean
http://www.headzoo.com
/wp-includes/rss-functions.php
I Use DOMIT xml parser to write my plugin.
It’s written purely in PHP and should therefore run on any Web hosting platform with PHP 4 and above installed.
Take a look at http://freshmeat.net/projects/domit/