clean up the arr::toxml function