/* Otherwise need to verify that we are currently over START_ELEMENT.
* Problem is we have already went past it...
*/
if (mPrePeekEvent != START_ELEMENT) {
throw new WstxParsingException
(ErrorConsts.ERR_STATE_NOT_STELEM, evt.getLocation());
}
// ??? do we need to update mPrePeekEvent now
String str = null;
StringBuffer sb = null;
/* Ok, fine, then just need to loop through and get all the
* text...
*/
for (; true; evt = nextEvent()) {
if (evt.isEndElement()) {
break;
}
int type = evt.getEventType();
if (type == COMMENT || type == PROCESSING_INSTRUCTION) {
// can/should just ignore them
continue;
}
if (!evt.isCharacters()) {
throw new WstxParsingException("Expected a text token, got "
+ErrorConsts.tokenTypeDesc(type),
evt.getLocation());
}
String curr = evt.asCharacters().getData();
if (str == null) {