public void generateMap(int version, String mapping, String filename) throws Exception {
filename = filename.trim();
RuleSet rs = getRuleSet();
IMapGenerator mgen;
if(version == 1){
mgen = new MapGenerator();
}else{
mgen = new MapGenerator2();
}
if(!filename.toLowerCase().endsWith(".xml")){
filename += ".xml";