For what exactly do you get XP

I just completed a mission where I did almost no damage to my enemies, as I won by mostly just shooting off their gun-arm and then letting them run. What I noticed on the XP-screen though, was that the soldier who got the most XP was the one who I knew for a fact hadn’t even shot an enemy once, but he DID take a massive blow to the head and almost died, after which he healed himself for a truck-load of damage.

So by that logic, I assume that healing damage actually gives you quite a bit of xp, which made me think: What exactly DOES gives you xp?

I know for sure that shooting aliens gives you xp, but is the soldier landing the killing blow getting more?
Do you get xp from taking tactical points (the ones that gives your squad willpower back)?
Do you get xp from completing objectives?

You get XP for mission objectives and it gets divided amongst your soldiers based on how much they contributed.
You don’t get much from killing enemies, and it may actually be better to do less damage to enemies so that they don’t get evolution points.