private function doField(Block $block, \SimpleXMLElement $xmlField)
 {
     $field = new Field();
     $block->addField($field);
     $type = (string) $xmlField['type'];
     if (Field::typeExist($type)) {
         $field->type = $type;
     } else {
         throw new \org\equinox\exception\FormException("Type ({$type}) not found in field definition");
     }
     $this->doStringAttribute($field, $xmlField, 'legend');
     $this->doStringAttribute($field, $xmlField, 'name');
     $this->doStringAttribute($field, $xmlField, 'container');
     $this->doStringAttribute($field, $xmlField, 'dataprovider');
     $this->doStringAttribute($field, $xmlField, 'checkValueFunction');
     $this->doStringAttribute($field, $xmlField, 'children');
     $this->doIntegerAttribute($field, $xmlField, 'size');
     $this->doIntegerAttribute($field, $xmlField, 'cols');
     $this->doIntegerAttribute($field, $xmlField, 'rows');
     $this->doBooleanAttribute($field, $xmlField, 'mandatory');
     $this->doBooleanAttribute($field, $xmlField, 'unique');
 }