changed DOM to SAX. More memory optimizations.