Instead of preserving foods by inhibiting bacteria, I think it is better to preserve foods through the growth of beneficial bacteria, such as traditional lacto-fermentation. Those bacteria are beneficial for us to eat.
But for a diabetic to use xylitol for a sweetener is okay.