Edited XML generation to omit empty properties elements