Wolfgang Hoschek has uncovered a surprising bug in Java 1.6's SAX parser, a Xerces variant. Apparently in some circumstances com.sun.org.apache.xerces.internal.util.XMLStringBuffer "consumes 40 MB of memory in a single char[] array." The bug does not seem to be present when using the real Xerces 2.9.0 from Apache.