export XML that GenericSetup's parser can successfully parse

@davisagli since you introduced the bug, I'm poking you to review this fix :)