@Override public void endElement(String uri,String localName,String qName) throws SAXException {
  String elementName=localName != null ? localName : qName;
  if (elementName.equalsIgnoreCase("seq") || elementName.equalsIgnoreCase("par")) {
    ContainerElement parent=mCurrentElement.getParent();
    if (parent instanceof ParallelElement) {
      log.info("End: " + elementName + ", parent element type: PAR");
      mCurrentElement=parent;
      mState=State.PARA;
    }
 else     if (parent instanceof SequenceElement) {
      log.info("End: " + elementName + ", parent element type: SEQ");
      mCurrentElement=parent;
      mState=State.SEQ;
    }
 else {
      log.info("End: " + elementName);
    }
  }
  super.endElement(uri,localName,qName);
}

@ Override public void endElement ( String uri , String localName , String qName ) throws SAXException { String elementName = localName != null ? localName : qName ; if ( elementName . equalsIgnoreCase ( "seq" ) || elementName . equalsIgnoreCase ( "par" ) ) { ContainerElement parent = mCurrentElement . getParent ( ) ; if ( parent instanceof ParallelElement ) { log . info ( "End: " + elementName + ", parent element type: PAR" ) ; mCurrentElement = parent ; mState = State . PARA ; } else if ( parent instanceof SequenceElement ) { log . info ( "End: " + elementName + ", parent element type: SEQ" ) ; mCurrentElement = parent ; mState = State . SEQ ; } else { log . info ( "End: " + elementName ) ; } } super . endElement ( uri , localName , qName ) ; }
called by the sax parser for the end of every element .
