added functionality to omit empty XML tags