Catrobat.IDE.Core.Xml.XmlObjects.XmlSprite.CreateXml C# (CSharp) Method

CreateXml() private method

private CreateXml ( ) : System.Xml.Linq.XElement
return System.Xml.Linq.XElement
        internal override XElement CreateXml()
        {
            XmlParserTempProjectHelper.Sprite = this;

            var xRoot = new XElement(XmlConstants.Object);
            xRoot.SetAttributeValue(XmlConstants.Name, Name.ToString());

            if (Looks != null)
            {
                xRoot.Add(Looks.CreateXml());
            }

            //xRoot.Add(new XElement("name")
            //{
            //    Value = Name
            //});

            //if (Scripts != null)
            //{
            //    xRoot.Add(Scripts.CreateXml());
            //}

            if (Sounds != null)
            {
                xRoot.Add(Sounds.CreateXml());
            }

            if (Scripts != null)
            {
                xRoot.Add(Scripts.CreateXml());
            }

            return xRoot;
        }