protected void closeInitialInclude ( ) throws XMLStreamException { LOGGER . trace ( "Closing xi:include" ) ; int eventType = - 1 ; // we ascend the XML until the initial include is closed. while ( this . depth > 0 ) { eventType = this . mainReader . next ( ) ; if ( eventType == XMLStreamConstants . START_ELEMENT ) { LOGGER . trace ( "Closing loop: Start {}" , this . mainReader . getLocalName ( ) ) ; this . depth ++ ; } else if ( eventType == XMLStreamConstants . END_ELEMENT ) { LOGGER . trace ( "Closing loop: End {}" , this . mainReader . getLocalName ( ) ) ; this . depth -- ; } } LOGGER . trace ( "Closing xi:include complete" ) ; }
This method ascends the XML until the initial include is closed .