CMC is used to create a smooth texture, while xanthan gum is used as an emulsifier.
CMC is a more effective thickener and stabilizer than xanthan gum, but xanthan gum is more heat-stable and can be used to provide a greater viscosity.