Fixed the problem of using too much memory by changing from ET to SAX