public override void ReadData(ESPReader reader, long dataEnd)
        {
            while (reader.BaseStream.Position < dataEnd)
            {
                string subTag = reader.PeekTag();

                switch (subTag)
                {
                case "EDID":
                    if (EditorID == null)
                    {
                        EditorID = new SimpleSubrecord <String>();
                    }

                    EditorID.ReadBinary(reader);
                    break;

                case "ICON":
                    if (LargeIcon == null)
                    {
                        LargeIcon = new SimpleSubrecord <String>();
                    }

                    LargeIcon.ReadBinary(reader);
                    break;

                case "MICO":
                    if (SmallIcon == null)
                    {
                        SmallIcon = new SimpleSubrecord <String>();
                    }

                    SmallIcon.ReadBinary(reader);
                    break;

                case "RCLR":
                    if (MapColor == null)
                    {
                        MapColor = new SimpleSubrecord <Color>();
                    }

                    MapColor.ReadBinary(reader);
                    break;

                case "WNAM":
                    if (Worldspace == null)
                    {
                        Worldspace = new RecordReference();
                    }

                    Worldspace.ReadBinary(reader);
                    break;

                case "RPLI":
                    if (Areas == null)
                    {
                        Areas = new List <RegionArea>();
                    }

                    RegionArea tempRPLI = new RegionArea();
                    tempRPLI.ReadBinary(reader);
                    Areas.Add(tempRPLI);
                    break;

                case "RDAT":
                    if (DataEntries == null)
                    {
                        DataEntries = new List <RegionDataEntry>();
                    }

                    RegionDataEntry tempRDAT = new RegionDataEntry();
                    tempRDAT.ReadBinary(reader);
                    DataEntries.Add(tempRDAT);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
        public override void ReadDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (ele.TryPathTo("EditorID", false, out subEle))
            {
                if (EditorID == null)
                {
                    EditorID = new SimpleSubrecord <String>();
                }

                EditorID.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Large", false, out subEle))
            {
                if (LargeIcon == null)
                {
                    LargeIcon = new SimpleSubrecord <String>();
                }

                LargeIcon.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Icon/Small", false, out subEle))
            {
                if (SmallIcon == null)
                {
                    SmallIcon = new SimpleSubrecord <String>();
                }

                SmallIcon.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("MapColor", false, out subEle))
            {
                if (MapColor == null)
                {
                    MapColor = new SimpleSubrecord <Color>();
                }

                MapColor.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Worldspace", false, out subEle))
            {
                if (Worldspace == null)
                {
                    Worldspace = new RecordReference();
                }

                Worldspace.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Areas", false, out subEle))
            {
                if (Areas == null)
                {
                    Areas = new List <RegionArea>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    RegionArea tempRPLI = new RegionArea();
                    tempRPLI.ReadXML(e, master);
                    Areas.Add(tempRPLI);
                }
            }
            if (ele.TryPathTo("DataEntries", false, out subEle))
            {
                if (DataEntries == null)
                {
                    DataEntries = new List <RegionDataEntry>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    RegionDataEntry tempRDAT = new RegionDataEntry();
                    tempRDAT.ReadXML(e, master);
                    DataEntries.Add(tempRDAT);
                }
            }
        }