It is a very easy swap. Depending on your car's date of manufacture, you may need to get a set of radio adapter cables. BMW changed from the "old gen" round-pin radio plugs to the "new gen" flat-pin radio plugs in 2002. So, you just need to buy the newer style CD radio, possibly a set of adapter cables, and swap in about 15 minutes. Plus, as an added bonus, if you get a new enough CD radio, you can also upgrade to Sirius.
Here is a post that describes the Sirius upgrade, but the radio notes are totally applicable to you.
http://www.xoutpost.com/articles/x5/s...02-bmw-x5.html
If you need them, here is a list of the radio adapters you will also need. (I also included the Aux input adapter, since the flat pin radios also have aux input.)
61.12-6 913 957 Round Pin to Flat Pin Main Radio Harness Adapter
61.12-6 913 955 New Gen Radio Antenna Adapter
61.12-6 924 785 10-Pin to 12-Pin Radio Audio Input Adapter
82.11-0 149 390 Aux Input Adapter Kit for New Gen Radio