There are 3 main ways to get XP in the game and here's the layout.
#1 Doing quests gives you the most XP, make sure to capitalize on it. I was able to basically stay with main quests only n get my needed XP (also completed all locations, DLC and core game) so side quests shouldn't be too necessary.
#2 Completing locations grants you a ton of XP and is usually pretty painless and quick to do it. Whether it's killing a animal, finding some treasures, killing a captain/commander, or reading a statue/finding a scroll, finding a place to rest it's usually not too bad.
#3 Killing enemies doesn't give you much xp at all but since you are doing a bunch of sneak killing then getting the Stealth Kill Streak perk early on can add a lot in the long run.
A side note, boosting to level 45 when you have the DLC can drastically speed this up.