In the large majority of cases, yes. They're both slightly different versions of the MPEG4 standard, with XviD being an open-source algorithm. Thus it is sometimes more enthusiastically applied, and the more advanced features such as GMC (Global Motion Compensation) Qpel (Quarter-pixel) or a PBS (Packed Bit Stream) are used in the encoding. If you're doing the coding yourself then for maximum compatibility. do not select these options in whatever application you're using.
For files already encoded, you can use MPEG4 Modifier to unpack the bitstream, but GMC or Qpel cannot be rectified so easily.