Maybe this will help:
1. You don't get XP from fighting barbarians beyond 10 - you'd need to fight against an AI or MP civilization to get further experience, in other words
2. If your unit has more than 10 XP and you upgrade it to a more modern unit, the XP reset to 10