Good question.. let's see here, it's been a LONG while (hehe)
Firstly.. XML, can't help ya much sorry.. in my very early days i swore off XML coding.. mainly due to the different FLMM versions.. and my own aversion to having to constantly *re-mod* the mod every time i changed something.. but all is not lost.
I use a hard method for everything, over time i've made templates, kind of like XML but without the fluff code.. just pure *blank* .ini .. this works well for many things but for factions i work a little differently, it's a huge task honestly to add just 1.. so i normally wait and add a few at once, this usually takes me (even with templates) a good day's work.. as it's not enough to just slap a faction in, you need to also add everything else for each faction.. or risk problems latter.
This means..
All the required basic data.
At least one ship/loadout (easy to use a reg starflier here)
At least one base.. or affiliation with one faction that owns a base (i've found this most important) this also requires you alter mBases.ini
Faction Rep/empathy data (VERY IMPORTANT)
Magic number entry data.. yes.. it's a real thing, and it works. That's where you find the magic blank spaces in original .dlls and input your faction there as well as your new .dll .. for XLR you can just find where i've done it and add the next ones just after.. i think it's in content.dll.. i think..
(there's major tut's on this)
I also use FlDev for ALL .dll entry.. it works 100% and reads/writes into original .dlls too.. but you'll need a dual core PC.. don't blame me.. blame Friendly Fire.. it's his baby lolz.
That's how i do it.. it's been a few years since i've touched that stuff. but i am thinking of altering XLR's factions a touch before the next release (in a few days) so I can probably help you more soon after the next (and very long awaited) version is unleashed.