Updated for php array, pending review of xml