public Element createElement(StartElement startEvent){
  QName qname=startEvent.getName();
  org.dom4j.QName elemName=createQName(qname);
  Element elem=factory.createElement(elemName);
  for (Iterator<Attribute> i=startEvent.getAttributes(); i.hasNext(); ) {
    Attribute attr=i.next();
    elem.addAttribute(createQName(attr.getName()),attr.getValue());
  }
  for (Iterator<Namespace> i=startEvent.getNamespaces(); i.hasNext(); ) {
    Namespace ns=i.next();
    elem.addNamespace(ns.getPrefix(),ns.getNamespaceURI());
  }
  return elem;
}

public Element createElement ( StartElement startEvent ) { QName qname = startEvent . getName ( ) ; org . dom4j . QName elemName = createQName ( qname ) ; Element elem = factory . createElement ( elemName ) ; for ( Iterator < Attribute > i = startEvent . getAttributes ( ) ; i . hasNext ( ) ; ) { Attribute attr = i . next ( ) ; elem . addAttribute ( createQName ( attr . getName ( ) ) , attr . getValue ( ) ) ; } for ( Iterator < Namespace > i = startEvent . getNamespaces ( ) ; i . hasNext ( ) ; ) { Namespace ns = i . next ( ) ; elem . addNamespace ( ns . getPrefix ( ) , ns . getNamespaceURI ( ) ) ; } return elem ; }
constructs a new dom4j element from the provided startelement event . all attributes and namespaces will be added to the returned element .
