[Sander Lowie] "At this moment my main problem is that I have to edit a xvid avi file"
Instal Perian version 1.2.3 and see if Quicktime and MPEGStreamclip can play it.
[Sander Lowie] "Wich other codec can i convert the xvid avi file to that can be easily edited in FCPx"
Apple ProRes. In FCPX under Final Cut Pro menu select Download Additional Content and that will install the codecs amongst other things if you haven't done that yet.
Also after doing that go here and download codecs
http://support.apple.com/kb/DL1396
At this point MPEGStreamclip should show various Apple ProsRes codecs as option when selecting Quicktime and Format.
An alternate codec that everyone has because it installs with iMovie (which is preinstalled on every Mac) is Apple Intermediate Codec but the quality isn't as good as ProRes.