public void serializeAttributes(BeanT bean, XMLSerializer target) throws SAXException, IOException, XMLStreamException {
for( AttributeProperty<BeanT> p : attributeProperties )
try {
if (retainPropertyInfo) {
final Property parentProperty = target.getCurrentProperty();
target.currentProperty.set(p);
p.serializeAttributes(bean,target);
target.currentProperty.set(parentProperty);
} else {
p.serializeAttributes(bean,target);