Fold empty nodes when generating xml