@Override
	public Element next() throws ParsingException
	{
		canStepDown = false;
		
		if(!stepForward())
		{
			currentElement = null;
			return null;
		}
		
		try
		{
			lastEvent = eventReader.nextEvent();
		}
		catch (XMLStreamException e)
		{
			throw new ParsingException(e);
		}
		
		if(lastEvent.isStartElement())
		{
			return createElement();
		} else if(lastEvent.isCharacters())
		{
			return createTextElement();
		}
		
		throw new Error("Parser reached bad state! " + lastEvent.getLocation().getLineNumber() + ":" + lastEvent.getLocation().getColumnNumber());
	}