Minecraft wiki entry for Development_versions, associated text: Added a command variable to the command.
Use "L" after number to represent number of levels, not number of xp.
For example "/xp 4L" will give a player 4 levels.