DefaultHandler (@NotNull Reader reader, GeneralTestEventsProcessor processor) { final String[] rooName = new String[]{null}; NanoXmlUtil.parse(reader, new NanoXmlBuilder() { @Override public void elementAttributesProcessed(String name, String nsPrefix, String nsURI) throws Exception { throw NanoXmlUtil.ParserStoppedXmlException.INSTANCE; } @Override public void startElement(String name, String nsPrefix, String nsURI, String systemID, int lineNr) { rooName[0] = name; } }); return TESTSUITES.equals(rooName[0]) ? new AntTestContentHandler(processor) : null; }