Is there a way to convert XML to array using Zend Framework and PHP? I have seen folks using SimpleXML to do this, but I wanted to know if there's a way through Zend Framework.
Sample XML, I wanted to convert to array would be:
<library>
<book>
<authorFirst>Mark</authorFirst>
<authorLast>Twain</authorLast>
<title>The Innocents Abroad</title>
</book>
<book>
<authorFirst>Charles</authorFirst>
<authorLast>Dickens</authorLast>
<title>Oliver Twist</title>
</book>
</library>
The converted array will look like this:
Array
(
[0] => Array (
[authorFirst] => Mark
[authorLast] => Twain
[title] => Innocents Abroad
)
[1] => Array (
[authorFirst] => Charles
[authorLast] => Dickens
[title] => Oliver Twist
)
)