views:

77

answers:

3

In addition to this question: iPhone network performance, I would like to know if there are any (very) good XML parsing frameworks out there for PHP.

PHP has great XML support already, but I wonder if it could be better (in terms of performance, memory usage, etc).

+1  A: 

There are several:

SimpleXML is pretty easy to use but has some serious limitations, like an apparent inability to deal with elements that contain both text and other elements, for which I've had to use DOMDocument instead.

cletus
I am aware that there are more (I currently use SimpleXML) but I wonder if they are all just as fast .. I have a very simple structure (RSS like), so I'm not in need of any advanced functions.
MiRAGe
A: 

Here's a list of PHP's PEAR XML packages

And here are PHP's PECL XML Packages

Ólafur Waage
Thanks, although I do not understand the difference (yet) I will take a look at it!
MiRAGe
+1  A: 

XMLReader and XMLWriter are probably your best options when it comes to performance.

These 2 have the benefit of not needing the full DOM tree of your xml in memory, although they aren't as convenient to work with.

Werner
I'll check it out, thank you.
MiRAGe