Pretty sure you get XP for dealing damage, and then a little bonus for actually incapacitating.
And when they're incapacitated, you get XP for damage, but you only get a bonus for a melee finish, not for shooting them until they die. Or you get a bigger bonus for the melee. I'm not sure.