}
}
private boolean isXmlType(String type) {
try {
ContentType ct = new ContentType(type);
return ct.getSubType().equals("xml") &&
(ct.getPrimaryType().equals("text") ||
ct.getPrimaryType().equals("application"));
} catch (Exception ex) {
return false;
}
}