refactored XMLBuilder