I think I've made it clear on this forum already how much I hate XML, but I'll say again... I hate it. What crap XML is. If you want to use something like it, at least go with JSON because it's much more compact and legible. XML is just a bloody mess.
For something like your game I will usually do one of the following:
1) Make a 2D grid in a text file. Each letter is something else, like "L" might be laser cannon, " " is nothing, "S" is starting point, etc. You can just eyeball it to see what looks like, it's very quick and easy to edit, and it's also quick and easy to implement. The one downside is adding meta data of any kind to each element - you obviously can't do that easily. When I get to this level of complexity, I generally just do:
2) Make a simple grid-based level editor. If you understand Swing or some other UI system well, you can easily make one of these in a few days. Just have a palette of tiles, click on a given space and change its value with whatever tile. Then add right-click support to add metadata or whatever. I've made plenty of these and they're always fun to do.
If you don't feel up to #2, you could still figure out ways of putting metadata into #1, like having a range of special characters (0-9 are good choices, or all lowercase characters) that represent metadata entities, then if you put that in it loads a template specified below the level data or something. Or you could just have the option below of specifying what a certain letter means and then have that override its default behavior. Like this:
1 2 3 4 5 6 7 8 9 10 11
| WWWWWWW W B W W 0 0 W WG GW WG GW WG GW W S W WWWWWWW / B:{class:Boss, hp:500, damage:10, pattern:spinny} 0:{class:Ship, hp:10, damage:3, pattern:swoop} |
I'm obviously using pseudo-JSON there (see how legible that is?), but you could do whatever you want. I often just use spaces to separate values, and know which value is what (first value is the letter, second is the class, third is hp, etc.). That's super easy but then of course it's more difficult to know exactly what means what - it's the equivalent of a method with a ton of parameters.
The key is: don't confine yourself to XML, because it sucks. Do whatever fits your needs best.