@Override
	public void endElement(String uri, String localName, String qName)
			throws SAXException {

		String topElement = "";
		if (elements.size() > 0) {
			topElement = elements.peek();
		}
		if (localName.equals(topElement)) {
			elements.pop();

			if (localName.equals("s")) {
                for(String[] secEdge: secedges){
				    curSentence.addSecEdge(secEdge);
                }
                secedges = new LinkedList<String[]>();
                getSentences().add(curSentence);
				curSentence = null;
			}

			if (localName.equals("nt")) {
				curSentence.addNonterminal(curNode);
				curNode = null;
			}

            if (localName.equals("t")) {
                curSentence.addTerminal(curNode);
                curNode = null;
            }

			if (localName.equals("frame")) {
				curSentence.addFrame(curFrame);
				curFrame = null;
			}

			if (localName.equals("fe")) {
				curFEName = "";
			}
		}
	}