To clarify: Does XP needed for the next level exclude XP needed to get the previous level?
I am 99% positive that it doesn't, on the basis that it doesn't say anywhere in the rulebook (for either game) that it does, and I've never encountered anyone who treats them like that.
On the other hand, one of my players asked me this the other day, and I'd be interested in knowing if anyone does this.
Best Answer
From PFSRD
From the Pathfinder Core Rulebook, p. 407, the paragraph titled "Experience Points":
Consulting Table 3-1: Character Advancement and Level-Dependent Bonuses on page 30, we find that for medium advancement, 19th level is 2,550,000 and 20th level is 3,600,000. The difference between these is 1,050,000. So the first reference implies that the experience levels in the table are cumulative, since the difference is what's required to advance.
From the Players Handbook I v 3.5, p.58, under "Experience and Levels":
Looking at Table 3-2 on p. 22, we find 2nd level at 1,000 XP and 3rd level at 3,000 XP, and the text quoted above indicates that the values in the table are totals, and that only the difference is required to advance.