protected String readCharactersUntilEndTag(XMLEventReader reader,
                                               QName tagName)
            throws XMLStreamException, JournalException {
        StringBuffer stringValue = new StringBuffer();
        while (true) {
            XMLEvent event = reader.nextEvent();
            if (event.isCharacters()) {
                stringValue.append(event.asCharacters().getData());
            } else if (isEndTagEvent(event, tagName)) {
                break;
            } else {
                throw getNotCharactersException(tagName, event);
            }
        }
        return stringValue.toString();
    }
protected String readCharactersUntilEndTag ( XMLEventReader reader , QName tagName ) throws XMLStreamException , JournalException { StringBuffer stringValue = new StringBuffer ( ) ; while ( true ) { XMLEvent event = reader . nextEvent ( ) ; if ( event . isCharacters ( ) ) { stringValue . append ( event . asCharacters ( ) . getData ( ) ) ; } else if ( isEndTagEvent ( event , tagName ) ) { break ; } else { throw getNotCharactersException ( tagName , event ) ; } } return stringValue . toString ( ) ; }
Loop through a series of character events, accumulating the data into a
String. The character events should be terminated by an EndTagEvent with
the expected tag name.