Xylose is described as a component of bacterial exopolysaccharides in only a limited number of bacterial strains. A bacterial strain, Paenibacillus elgii , B69 was shown to be efficient in producing a xylose-containing exopolysaccharide. Sequence analysis was performed to identify the genes encoding the uridine diphosphate (UDP)-glucuronic acid decarboxylase required for the synthesis of UDP-xylose, the precursor of the exopolysaccharide. Two sequences, designated as Peuxs 1 and Peuxs 2, were found as the candidate genes for such enzymes. The activities of the UDP-glucuronic acid decarboxylases were proven by heterologous expression and real-time nuclear magnetic resonance analysis. The intracellular activity and effect of these genes on the synthesis of exopolysaccharide were further investigated by developing a thymidylate synthase based knockout system. This system was used to substitute the conventional antibiotic resistance gene system in P. elgii , a natural multi-antibiotic resistant strain. Results of intracellular nucleotide sugar analysis showed that the intracellular UDP-xylose and UDP-glucuronic acid levels were affected in Peuxs 1 or Peuxs 2 knockout strains. The knockout of either Peuxs 1 or Peuxs 2 reduced the polysaccharide production and changed the monosaccharide ratio. No polysaccharide was found in the Peuxs 1/ Peuxs 2 double knockout strain. Our results show that P. elgii can be efficient in forming UDP-xylose, which is then used for the synthesis of xylose-containing exopolysaccharide.