private Faction buildFactionFromXML(StringBuffer buf, String factionID)
	{
		final Faction F=(Faction)CMClass.getCommon("DefaultFaction");
		F.initializeFaction(buf,factionID);
		for(final Enumeration<FRange> e=F.ranges();e.hasMoreElements();)
		{
			final Faction.FRange FR=e.nextElement();
			final String CodeName=(FR.codeName().length()>0)?FR.codeName().toUpperCase():FR.name().toUpperCase();
			if(!hashedFactionRanges.containsKey(CodeName))
				hashedFactionRanges.put(CodeName,FR);
			final String SimpleUniqueCodeName = F.name().toUpperCase()+"."+FR.name().toUpperCase();
			if(!hashedFactionRanges.containsKey(SimpleUniqueCodeName))
				hashedFactionRanges.put(SimpleUniqueCodeName,FR);
			final String UniqueCodeName = SimpleUniqueCodeName.replace(' ','_');
			if(!hashedFactionRanges.containsKey(UniqueCodeName))
				hashedFactionRanges.put(UniqueCodeName,FR);
			final String SimpleUniqueIDName = F.factionID().toUpperCase()+"."+FR.name().toUpperCase();
			if(!hashedFactionRanges.containsKey(SimpleUniqueIDName))
				hashedFactionRanges.put(SimpleUniqueIDName,FR);
		}
		return addFaction(F) ? F : null;
	}