for(ElementDeclaration element:referencedElements) {
QName elementName = element.getElementName();
XMLField xmlField = this.getXPathForElement("", elementName, namespaceInfo, !(this.typeInfo.containsKey(element.getJavaTypeName())));
mapping.addChoiceElement(xmlField, element.getJavaTypeName());
if(!element.isXmlRootElement()) {
XMLRootConverter converter = new XMLRootConverter(xmlField);
mapping.addConverter(xmlField, converter);
}
hasJAXBElements = hasJAXBElements || !element.isXmlRootElement();
if(hasJAXBElements) {
mapping.setAttributeAccessor(new JAXBElementAttributeAccessor(mappingAccessor));