JAVA SAX parser split calls to characters()

Parser is calling characters method more than one time, because it can and allowed per spec. This helps fast parser and keep their memory footprint low. If you want a single string create a new StringBuilder object in the startElement and process it on endElement method.

Leave a Comment