The getText()
method returns the text of the current event:
public String getText()
It works for CHARACTERS, SPACE, ENTITY_REFERENCE, DTD, and COMMENT events.
Not guaranteed to return a maximum contiguous run of text unless javax.xml.stream.isCoalescing is true
For all other event types it throws an
java.lang.IllegalStateException