Added the XML object to the return array.
Properly parse repeated elements into arrays, and attributes as objects.