The entirety of xml2array is (as the comment says, iirc, it might not, if it doesn't, add it) is a function acquired from elsewhere, so should be fine.
However, have you checked usages of this? I think it may have only been used for the lastfm or musicbrainz fingerprinters, of which we now only use lastfm, and I have customised that to return json (mental note: actually publish my changes to that)