/**
         * Reads culture types from a given XML file.
         */
        public void readProfessionsFromXML(string fileName)
        {
            // reader creation
            XmlTextReader reader = new XmlTextReader(fileName);

            // whilst we read the file
            while (reader.Read())
            {
                //
                if (reader.NodeType == XmlNodeType.Element)
                {
                    if (reader.Name == "profession")
                    {
                        string professionName        = "";
                        string professionDescription = "";
                        Dictionary <string, Skill> professionSkills = new Dictionary <string, Skill>();
                        while (reader.Read() && reader.Name != "profession")
                        {
                            switch (reader.Name)
                            {
                            case "profession_name":
                                reader.Read();
                                professionName = reader.Value;
                                while (reader.Read() && reader.NodeType != XmlNodeType.EndElement)
                                {
                                    ;
                                }
                                break;

                            case "profession_description":
                                reader.Read();
                                professionDescription = reader.Value;
                                while (reader.Read() && reader.NodeType != XmlNodeType.EndElement)
                                {
                                    ;
                                }
                                break;

                            case "skill":
                                reader.Read();
                                try
                                {
                                    professionSkills.Add(skills[reader.Value].getSkillName(), skills[reader.Value]);
                                }
                                catch (KeyNotFoundException ke)
                                {
                                    Console.WriteLine("No skill of name " + reader.Value + " found whilst parsing profession " + professionName + ".");
                                }
                                while (reader.Read() && reader.NodeType != XmlNodeType.EndElement)
                                {
                                    ;
                                }
                                break;
                            }
                        }
                        Profession profession = new Profession(professionName, professionDescription);
                        foreach (KeyValuePair <string, Skill> entry in professionSkills)
                        {
                            profession.addSkill(entry.Value);
                        }
                        addProfession(profession);
                    }
                }
            }
        }
 public void addProfession(Profession profession)
 {
     professions.Add(profession.getProfessionName(), profession);
 }