CAS newCas = CasCreationUtils.createCas(typeSystem, new TypePriorities_impl(), indexes);
for (int i = 0; i < 2; i++) {
XCASDeserializer newDeser = new XCASDeserializer(newCas.getTypeSystem());
ContentHandler newDeserHandler = newDeser.getXCASHandler(newCas);
SAXParserFactory fact = SAXParserFactory.newInstance();
SAXParser parser = fact.newSAXParser();
XMLReader xmlReader = parser.getXMLReader();
xmlReader.setContentHandler(newDeserHandler);
xmlReader.parse(new InputSource(new StringReader(xml)));
// check sofas