parse entity attr and type