Doesn't generate XML when not necessary