private EventNode read() throws Exception {
  XMLEvent event=reader.nextEvent();
  if (!event.isEndDocument()) {
    if (event.isStartElement()) {
      return start(event);
    }
    if (event.isCharacters()) {
      return text(event);
    }
    if (event.isEndElement()) {
      return end();
    }
    return read();
  }
  return null;
}

private EventNode read ( ) throws Exception { XMLEvent event = reader . nextEvent ( ) ; if ( ! event . isEndDocument ( ) ) { if ( event . isStartElement ( ) ) { return start ( event ) ; } if ( event . isCharacters ( ) ) { return text ( event ) ; } if ( event . isEndElement ( ) ) { return end ( ) ; } return read ( ) ; } return null ; }
this is used to read the next node from the document . this will scan through the document , ignoring any comments to find the next relevant xml event to acquire . typically events will be the start and end of an element , as well as any text nodes .
