Updated to handle non xml responses and blank xmls