public void parse(ContentType contentType, String body) throws ParseException { if (ContentType.GDATA_ERROR.equals(contentType)) { XmlParser xp = new XmlParser(); try { xp.parse(new StringReader(body), new ErrorsHandler(), "http://schemas.google.com/g/2005", "errors"); } catch (IOException ioe) { // Impossible case: we are always parsing from a String throw new RuntimeException("Impossible parser I/O", ioe); } } }
public void parse(ContentType contentType, String body) throws ParseException { if (ContentType.GDATA_ERROR.equals(contentType)) { XmlParser xp = new XmlParser(); try { xp.parse(new StringReader(body), new ErrorsHandler(), "http://schemas.google.com/g/2005", "errors"); } catch (IOException ioe) { // Impossible case: we are always parsing from a String throw new RuntimeException("Impossible parser I/O", ioe); } } }
public void parse(ContentType contentType, String body) throws ParseException { if (!(ContentType.GDATA_ERROR.equals(contentType))) { return; // nothing to parse } XmlParser xp = new XmlParser(); try { xp.parse(new StringReader(body), new ErrorsHandler(), "http://schemas.google.com/g/2005", "errors"); } catch (IOException ioe) { // Impossible case: we are always parsing from a String throw new RuntimeException("Impossible parser I/O", ioe); } }
if ((se.getResponseContentType().equals(new ContentType("text/xml"))) && (se.getResponseBody().contains("AppsForYourDomainErrors"))) { try {
if ((se.getResponseContentType().equals(new ContentType("text/xml"))) && (se.getResponseBody().contains("AppsForYourDomainErrors"))) { try {