Better way of checking for XML responses

Instead of checking for the first character being '<', we should check the content type of the response, if it matches "application/xml".