It's probably because you're not implementing the characters method correctly, see Oracle's tutorial:
Parsers are not required to return any particular number of characters
at one time. A parser can return anything from a single character at a
time up to several thousand and still be a standard-conforming
implementation. So if your application needs to process the characters
it sees, it is wise to have the characters() method accumulate the
characters in a java.lang.StringBuffer and operate on them only when
you are sure that all of them have been found.
Your code is assuming you're getting the entire text for an element in one call, but that's not guaranteed. The characters method needs to accumulate the text found into a StringBuffer
(or StringBuilder or other data structure), but the decisions on what to do with the accumulated text need to be somewhere else, such as in the endElement
method. It looks like you are setting a flag prematurely in the characters method and causing the rest of the text to be lost.