@Override
	public T parse(XMLEventReader reader) throws XMLStreamException {
		XMLEvent event = reader.nextEvent();
		StartElement startElement = event.asStartElement();
		boolean isKnownElement = startElement.getName().equals(name);
		attributes = getAttributes(startElement);
		if (reader.peek().isCharacters()) {
			Characters characters = reader.nextEvent().asCharacters();
			if (!characters.isWhiteSpace()) {
				content = characters.getData();
			}
		}
		while (ignoreWhiteSpace(reader) && reader.hasNext() && !reader.peek().isEndElement()) {
			processChild(reader);
		}
		T object = null;
		if (isKnownElement) {
			object = buildObject();
		}
		consumeEndElement(reader);
		return object;
	}