Yes, there are commercial solutions, and yes, in PHP 5 the DOM will be nice & cosy with XML, but for now extracting data from XML with PHP is a bit of a pain - a bit.
There is a nice and illuminating article on this which explains it quite clearly - so if you need to do this stuff (I am not talking about generating XML with PHP, but parsing), maybe you find this helpful as well:
http://www.devarticles.com/c/a/PHP/Conv ... Structure/
XML to PHP array - here's more info
Moderator: General Moderators
Hmm...there is actually a PHP function that parses an xml-file into an array - although a darstardly one which doesn't mirror the parent-child relationships of the xml-document.
[php_man]xml_parse_into_struct[/php_man]
It's not beautiful and after playing around with it for a couple of days I wouldn't recommend it. Rather use one of the functions provided in the user-notes to generate a proper multidimensional array - provided you don't have server-access and can't install expat (PHP's xpath library).
[php_man]xml_parse_into_struct[/php_man]
It's not beautiful and after playing around with it for a couple of days I wouldn't recommend it. Rather use one of the functions provided in the user-notes to generate a proper multidimensional array - provided you don't have server-access and can't install expat (PHP's xpath library).