{
String keyAttr = getKeyMapAttribute();
Class keyClass = getKeyMapClass();
TypesConverters conv = DefaultTypesConvertors.instance();
ToValueConvertor toValue = keyClass==null ? null : conv.toValueFor(keyClass);
if( !parentNode.hasChildNodes() ||
!(parentObject instanceof Map) ||
keyAttr==null || keyAttr.length()<1 ||
keyClass==null ||
toValue==null
)
{
onChildrenAdded(parentObject);
return;
}
NodeList nl = parentNode.getChildNodes();
int count = nl.getLength();
for( int i=0; i<count; i++ )
{
Node childNode = nl.item(i);
if( childNode==null )continue;
if( !childNode.hasAttributes() )continue;
Node keyNode = childNode.getAttributes().getNamedItem(keyAttr);
if( keyNode==null )continue;
String keyValueString = keyNode.getNodeValue();
if( keyValueString==null )continue;
try
{
Object keyObject = toValue.convertToValue(keyValueString);
if( keyObject==null )continue;
Object childObject = parse(childNode);
if( childObject!=null )
{