예제 #1
0
        public XElement ToXML( )
        {
            XElement xPerson = new XElement(Fb2Const.fb2DefaultNamespace + ElementName);

            if (FirstName != null)
            {
                xPerson.Add(FirstName.ToXML(FirstNameElementName));
            }
            if (MiddleName != null)
            {
                xPerson.Add(MiddleName.ToXML(MiddleNameElementName));
            }
            if (LastName != null)
            {
                xPerson.Add(LastName.ToXML(LastNameElementName));
            }
            if (NickName != null)
            {
                xPerson.Add(NickName.ToXML(NickNameElementName));
            }
            if (HomePage != null)
            {
                xPerson.Add(HomePage.ToXML(HomePageElementName));
            }
            if (EMail != null)
            {
                xPerson.Add(EMail.ToXML(EMailElementName));
            }
            if (UID != null)
            {
                xPerson.Add(UID.ToXML(IdElementName));
            }
            return(xPerson);
        }