Script now pulls an xml flex query.