public override void LoadDataFromXML()
        {
            bool exists = false;

            if (DataXMLDoc != null)
            {
                _objectID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "objectID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("objectID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("objectID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(objectID, "objectID"));
                }
                SetPropertyExists("objectID", exists);

                _objectType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "objectType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("objectType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("objectType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "objectType"));
                }
                SetPropertyExists("objectType", exists);
                _sunType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "sunType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("sunType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("sunType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "sunType"));
                }
                SetPropertyExists("sunType", exists);
                _name = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "name", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("name", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("name", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "name"));
                }
                SetPropertyExists("name", exists);
                _materialName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "materialName", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("materialName", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("materialName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "materialName"));
                }
                SetPropertyExists("materialName", exists);
                _billboardFlareMaterial = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "billboardFlareMaterial", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("billboardFlareMaterial", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("billboardFlareMaterial", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "billboardFlareMaterial"));
                }
                SetPropertyExists("billboardFlareMaterial", exists);
                _faction = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "faction", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("faction", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("faction", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "faction"));
                }
                SetPropertyExists("faction", exists);
                _meshName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "meshName", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("meshName", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("meshName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "meshName"));
                }
                SetPropertyExists("meshName", exists);
                _wireframeMaterial = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "wireframeMaterial", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("wireframeMaterial", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("wireframeMaterial", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "wireframeMaterial"));
                }
                SetPropertyExists("wireframeMaterial", exists);
                _sunFlareParticleSystem = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "sunFlareParticleSystem", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("sunFlareParticleSystem", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("sunFlareParticleSystem", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "sunFlareParticleSystem"));
                }
                SetPropertyExists("sunFlareParticleSystem", exists);
                _collisionShape = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "collisionShape", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("collisionShape", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("collisionShape", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "collisionShape"));
                }
                SetPropertyExists("collisionShape", exists);
                _additionalObjectMesh = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "additionalObjectMesh", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("additionalObjectMesh", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("additionalObjectMesh", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "additionalObjectMesh"));
                }
                SetPropertyExists("additionalObjectMesh", exists);

                _flareSize = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "flareSize", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("flareSize", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("flareSize", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "flareSize"));
                }
                SetPropertyExists("flareSize", exists);
                _scale = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "scale", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("scale", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("scale", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "scale"));
                }
                SetPropertyExists("scale", exists);
                _overworldScale = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "overworldScale", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("overworldScale", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("overworldScale", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "overworldScale"));
                }
                SetPropertyExists("overworldScale", exists);
                _rotateSpeed = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "rotateSpeed", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("rotateSpeed", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("rotateSpeed", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "rotateSpeed"));
                }
                SetPropertyExists("rotateSpeed", exists);
                _collisionShapeScale = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "collisionShapeScale", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("collisionShapeScale", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("collisionShapeScale", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "collisionShapeScale"));
                }
                SetPropertyExists("collisionShapeScale", exists);

                _isMassInfinite = ParseHelpers.GetBoolFromVD2Data(DataXMLDoc, "isMassInfinite", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("isMassInfinite", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("isMassInfinite", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "isMassInfinite"));
                }
                SetPropertyExists("isMassInfinite", exists);

                _specularColor = ParseHelpers.GetColorFromVD2Data(DataXMLDoc, "specularColor", out exists);
                _specularColor.OnElementChanged += specularColor_OnElementChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("specularColor", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("specularColor", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "specularColor"));
                }
                SetPropertyExists("specularColor", exists);
                _diffuseColor = ParseHelpers.GetColorFromVD2Data(DataXMLDoc, "diffuseColor", out exists);
                _diffuseColor.OnElementChanged += diffuseColor_OnElementChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("diffuseColor", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("diffuseColor", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "diffuseColor"));
                }
                SetPropertyExists("diffuseColor", exists);

                _damageCollisionField = new ObservableCollection <VD2DataStructure>(DataStructureParseHelpers.GetdamageCollisionFieldDataStructureListFromVD2Data(this, DataXMLDoc, out exists));
                _damageCollisionField.CollectionChanged += OndamageCollisionFieldChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("damageCollisionField", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("damageCollisionField", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "damageCollisionField"));
                }
                SetPropertyExists("damageCollisionField", exists);
                base.LoadDataFromXML();
            }
        }
        public override void LoadDataFromXML()
        {
            bool exists = false;

            if (DataXMLDoc != null)
            {
                _objectID = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "objectID", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("objectID", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("objectID", EditorUI.UI.Ships.DoesPropertyExistInBaseData(objectID, "objectID"));
                }
                SetPropertyExists("objectID", exists);

                _effectType = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "effectType", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("effectType", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("effectType", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "effectType"));
                }
                SetPropertyExists("effectType", exists);
                _materialName = ParseHelpers.GetStringFromVD2Data(DataXMLDoc, "materialName", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("materialName", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("materialName", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "materialName"));
                }
                SetPropertyExists("materialName", exists);

                _count = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "count", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("count", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("count", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "count"));
                }
                SetPropertyExists("count", exists);
                _numberOfChains = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "numberOfChains", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("numberOfChains", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("numberOfChains", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "numberOfChains"));
                }
                SetPropertyExists("numberOfChains", exists);
                _maxChainElements = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "maxChainElements", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("maxChainElements", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("maxChainElements", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "maxChainElements"));
                }
                SetPropertyExists("maxChainElements", exists);
                _trailLength = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "trailLength", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("trailLength", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("trailLength", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "trailLength"));
                }
                SetPropertyExists("trailLength", exists);
                _maxRangeZ = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "maxRangeZ", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("maxRangeZ", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("maxRangeZ", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "maxRangeZ"));
                }
                SetPropertyExists("maxRangeZ", exists);
                _defaultDimensions = ParseHelpers.GetInt32FromVD2Data(DataXMLDoc, "defaultDimensions", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("defaultDimensions", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("defaultDimensions", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "defaultDimensions"));
                }
                SetPropertyExists("defaultDimensions", exists);

                _widthChange = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "widthChange", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("widthChange", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("widthChange", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "widthChange"));
                }
                SetPropertyExists("widthChange", exists);
                _initialWidth = ParseHelpers.GetFloatFromVD2Data(DataXMLDoc, "initialWidth", out exists);
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("initialWidth", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("initialWidth", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "initialWidth"));
                }
                SetPropertyExists("initialWidth", exists);

                _initialColor = ParseHelpers.GetColorFromVD2Data(DataXMLDoc, "initialColor", out exists);
                _initialColor.OnElementChanged += initialColor_OnElementChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("initialColor", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("initialColor", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "initialColor"));
                }
                SetPropertyExists("initialColor", exists);
                _colorChange = ParseHelpers.GetColorFromVD2Data(DataXMLDoc, "colorChange", out exists);
                _colorChange.OnElementChanged += colorChange_OnElementChanged;
                if (Source.ShortName == "Base")
                {
                    SetPropertyExistsInBaseData("colorChange", exists);
                }
                else
                {
                    SetPropertyExistsInBaseData("colorChange", EditorUI.UI.Ships.DoesPropertyExistInBaseData(GetObjectID(), "colorChange"));
                }
                SetPropertyExists("colorChange", exists);

                base.LoadDataFromXML();
            }
        }