if(attrs != null && attrs.getLength() > 0)
{
for(int i = 0; i < attrs.getLength(); ++i)
{
QName attrName = new QName(attrs.getURI(i), attrs.getLocalName(i));
AttributeBinding attrBinding = metadata.getAttribute(attrName);
if(attrBinding != null)
{
Object unmarshalledValue = SimpleTypeBindings.unmarshal(attrs.getValue(i),
attrBinding.getJavaType()
);
if(child instanceof Immutable)
{
((Immutable)child).addChild(attrName.getLocalPart(), unmarshalledValue);
}
else
{
setFieldValue(attrBinding.getAttributeName(),
attrBinding.getField(),
attrBinding.getSetter(),
child,
unmarshalledValue
);
}
}