Added additional code to check if an element that is NOT an array has attributes and if so add them to the output. Previous code ignores elements with attributes that aren't arrays.
Added additional code to check if an element that is NOT an array has attributes and if so add them to the output. Previous code ignores elements with attributes that aren't arrays.

gaarf/XML-string-to-PHP-array