The chemical reactions and pathways involving xyloglucan, the cross-linking glycan composed of (1->4)-beta-D-glucan backbone substituted at regular intervals with beta-D-xylosyl-(1->6) residues, which is present in the primary cell wall of most higher pla