public void parse ( Reader reader , T data ) throws XMLStreamException , SNAXUserException { // TODO: this needs to catch concurrent parse attempts init ( reader , data ) ; for ( XMLEvent event = xmlReader . nextEvent ( ) ; xmlReader . hasNext ( ) ; event = xmlReader . nextEvent ( ) ) { processEvent ( event ) ; } }
Parse a data stream represented by a Reader to completion . This will process the entire document and trigger any ElementHandler calls that result from applying the selectors defined in the NodeModel . The data parameter will be passed back as an argument to all ElementHandler calls .