}
Document d = _xml.getOwnerDocument();
Element result = d.createElement(getFieldName());
_xml.appendChild(result);
ComplexTypeConverter ctc = _cd.getConverterHT().get(getType());
Set<Object> list = castToObjectSet(_o);
Iterator<Object> i = list.iterator();
while (i.hasNext()) {
Element itemXml = d.createElement(getFieldName());
result.appendChild(itemXml);
Object item = i.next();
ctc.toXml(itemXml, item, _cd);
}
}
catch (Exception e) {
throw new ConversionException(e.getMessage(), e);
}