Unless you get something like the Midiman Midisport 2x2 or bigger, you'll have to daisy-chain the gear. Which order in the chain works best for you, you'll have to try yourself. Start from the computer, midi out to midi in and so on. When you're sharing 16 channels, you'll have to deactivate some channels. Example: Your XP is using ch 1-8. You don't want the sampler to trigger on these so you turn them off in the sampler. This works differently with different gear.

-tek