StartEvent startEvent = new StartEvent(current, tagName, se.getAttributes(), se.getLocation());
eventList.add(startEvent);
}
private void addCharacters(XMLEvent xmlEvent) {
Characters characters = xmlEvent.asCharacters();
StaxEvent lastEvent = getLastEvent();
if (lastEvent instanceof BodyEvent) {
BodyEvent be = (BodyEvent) lastEvent;
be.append(characters.getData());
} else {
// ignore space only text if the previous event is not a BodyEvent
if(!characters.isWhiteSpace()) {
BodyEvent bodyEvent = new BodyEvent(characters.getData(), xmlEvent.getLocation());
eventList.add(bodyEvent);
}
}
}