Yes, you can edit the XML and it doesn't have to be condensed to a single line.
No, you cannot have gaps, which is really annoying, especially if you tend to organize things in groups and leave room to drop in another end point or two so that your OCD doesn't "force" you to reorganize your program just to add a source.
I suggest provisioning a few boxes via the director then download the XML so you know the formatting, then go to town.