I'm don't know much about Apache 2.0 attribution policy but should we preserve the header comment of the original file, as this is something that was developed externally and is licensed under Apache 2.0. That will also help us keep track of the current version of this code, along with its author information.

See: http://www.lalit.org/lab/convert-php-array-to-xml-with-attributes/
Source file here: http://www.lalit.org/wordpress/wp-content/uploads/2011/07/Array2XML.txt?ver=0.8

Apache 2.0 is compatible with GPL v3 so I think we're safe though.