@Override
	public XmlElement next() {
		if (hasNext()) {
			XmlElement elementToReturn = nextElement;
			nextElement = null;
			return elementToReturn;
		}
		return null;
	}
Returns the next element to be read and increments the iterator.

@return the next element to be read and increments the iterator
Ghidra/Framework/Generic/src/main/java/ghidra/xml/ThreadedXmlPullParserImpl.java