protected override void LoadData(XmlElement element) {
            this.ID = new GameIdentifier(Game.Name, element);

            foreach (XmlAttribute attrib in element.Attributes) {
                if (GameIdentifier.attributes.Contains(attrib.Name))
                    continue;

                switch (attrib.Name) {
                    case "virtualstore":
                        IgnoreVirtualStore = attrib.Value == "ignore";
                        break;
                    case "detect":
                        DetectionRequired = attrib.Value == "required";
                        break;
                    case "deprecated":
                        IsDeprecated = Boolean.Parse(attrib.Value);
                        break;
                    default:
                        throw new NotSupportedException(attrib.Name);
                }
            }
            Links.Clear();
            foreach (XmlElement sub in element.ChildNodes) {
                switch (sub.Name) {
                    case "title":
                        _title = sub.InnerText;
                        break;
                    case "locations":
                        this.Locations = new GameSaveInfo.Locations(this, sub);
                        break;
                    case "files":
                        FileType type = new FileType(this, sub);
                        FileTypes.Add(type.Type, type);
                        break;
                    case "ps_code":
                        PlayStationIDs.Add(APlayStationID.Create(this, sub));
                        break;
                    case "contributor":
                        Contributors.Add(sub.InnerText);
                        break;
                    case "comment":
                        Comment = sub.InnerText;
                        break;
                    case "restore_comment":
                        RestoreComment = sub.InnerText;
                        break;
                    case "identifier":
                        Identifiers.Add(new Identifier(this, sub));
                        break;
                    case "scummvm":
                        ScummVMs.Add(new ScummVM(this, sub));
                        break;
                    case "linkable":
                        Links.Add(new Link(this, sub));
                        break;
                    case "registry":
                        RegistryType rtype = new RegistryType(this, sub);
                        RegistryTypes.Add(rtype.Type, rtype);
                        break;
                    default:
                        throw new NotSupportedException(sub.Name);
                }
            }
        }
        public RegistryEntry(RegistryType reg, XmlElement element)
            : base(reg, element) {

        }
        public RegistryEntry addRegEntry(RegRoot root, string key, string value, string type) {
            if (!RegistryTypes.ContainsKey(type)) {
                RegistryType reg = new RegistryType(this, type);
                this.XML.AppendChild(reg.XML);
                RegistryTypes.Add(type, reg);
            }
            RegistryType registry = RegistryTypes[type];
            RegistryEntry entry = registry.addEntry(root, key, type);


            return entry;
        }
 public RegistryEntry(RegistryType reg, RegRoot root, string key, string value)
     : base(reg) {
     this.Root = root;
     this.Key = key;
     this.Value = value;
 }