xml creation - use blank instead of nil in if clause