Matthew Sims wrote:
Anyone know any good XML parsers that work with PHP5? Most of what I can find on freshmeat are still using PHP4 classes and Google isn't turning up much either.
What do you want to do? This parses xml pretty well:
<?php $parsed = simplexml_load_file('filename.xml'); ?>
as does this
<?php $dom = new DOMDocument; $dom->load('filename.xml'); ?>
The first one is brilliant for reading xml whose structure you know, the second is better for xml whose structure you wish to manipulate or transform.
best, it's built into PHP. If you want a system that can be easily serialized and unserialized as an object (as in sessions), you're probably best off using XML_Serializer from PEAR, as neither simplexml nor DOM retains any useful information when serialized and unserialized.
Greg
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php