public void parse( RepositoryElementReadListener repositoryElementReadListener )
    throws SAXException, ParserConfigurationException, IOException {
    this.repositoryElementReadListener = repositoryElementReadListener;

    SAXParserFactory factory = XMLParserFactoryProducer.createSecureSAXParserFactory();
    this.saxParser = factory.newSAXParser();
    this.saxParser.parse( new File( filename ), this );
  }
@Test ( expected = SAXParseException.class )
  public void exceptionIsThrownWhenParsingXmlWithBigAmountOfExternalEntities() throws Exception {
    File file = createTmpFile( XXEUtils.MALICIOUS_XML );

    repExpSAXParser = new RepositoryExportSaxParser( file.getAbsolutePath(), null );
    repExpSAXParser.parse( repImpMock );
  }