private static final Element processElement(final JDOMFactory factory,
			final StartElement event) {
		final QName qname = event.getName();

		final Element element = factory.element(qname.getLocalPart(),
				Namespace.getNamespace(qname.getPrefix(), qname.getNamespaceURI()));

		// Handle attributes
		for (final Iterator<?> it = event.getAttributes();
				it.hasNext(); ) {

			final javax.xml.stream.events.Attribute att =
					(javax.xml.stream.events.Attribute)it.next();

			final QName aqname = att.getName();

			final Namespace attNs = Namespace.getNamespace(aqname.getPrefix(),
					aqname.getNamespaceURI());

			factory.setAttribute(element, factory.attribute(
					aqname.getLocalPart(), att.getValue(),
					AttributeType.getAttributeType(att.getDTDType()), attNs));
		}

		for (final Iterator<?> it = event.getNamespaces(); it.hasNext();) {
			final javax.xml.stream.events.Namespace ns =
					(javax.xml.stream.events.Namespace)it.next();

			element.addNamespaceDeclaration(Namespace.getNamespace(
					ns.getPrefix(), ns.getNamespaceURI()));
		}

		return element;
	}