Since xanthan gum thickens liquids they can easily trap air bubbles and stabilize foams.
The first step to make an xanthan gum foam from a liquid is to mix in the xanthan gum using an immersion or standing blender. Once it's evenly dispersed you need to introduce air into the liquid. This can be done through whipping, blending, or with the use of a whipping siphon. Typically a whipping siphon is the most efficient way to create a foam.
Another interesting way to create an xanthan gum foam is through the use of an aquarium bubbler. It will create large, unevenly sized bubbles, resembling soap bubbles, which can add a whimsical quality to many dishes. For this preparation it is typically combined with Versawhip.