C# XML Annotations

I have a class of UserData that I am trying to Serialize and Deserialize using XML.

The problem is that when i Serialize, it creates a new xml file and adds the data, but the first added data is missing a <UserData></UserData>which is needed to properly read it in again.

Currently I can read the second part in.

Is there some kind of annotation I can add to my UserData class that will make it create the <UserData> when the object is written to XML?

public class UserData
    private string firstName, lastName, email, phone, birthday, serialNumber;

    //Empty constructor is mandatory in order to Serialize the object
    public UserData()


    public UserData(string firstName, string lastName, string email, string phone, string birthday, string serialNumber)
        this.firstName = firstName;
        this.lastName = lastName;
        this.email = email;
        this.phone = phone;
        this.birthday = birthday;
        this.serialNumber = serialNumber;

    //Getters & Setters
    public string FirstName { get => firstName; set => firstName = value; }

    public string LastName { get => lastName; set => lastName = value; }

    public string Email { get => email; set => email = value; }

    public string Phone { get => phone; set => phone = value; }

    public string Birthday { get => birthday; set => birthday = value; }

    public string SerialNumber { get => serialNumber; set => serialNumber = value; }

When I create the file using XmlSerializer it turns out like this:

<?xml version="1.0" encoding="utf-8"?>
   <birthday>12/6/2017 2:07:24 AM +01:00</birthday>
   <UserData>        <-------- CORRECT (BUT MISSING ABOVE)
   <birthday>12/6/2017 2:07:24 AM +01:00</birthday>
   </UserData>        <----- CORRECT

This is how i'm writing the file. I think the problem is that I use LINQ to append to the file, but XmlSerializer to create the file. And it seems like the XmlSerializer does not add the right XML setup.

public async void WriteUserdataToXML(string filename, Type type, object obj, string firstName, string lastName, string email, string phone, string birthday, string serialID)

        StorageFolder path = ApplicationData.Current.LocalFolder;

        //Check if file exists - create file if it does not.
        if (!File.Exists(path.Path + @"\" + filename + ".xml"))
            await Task.Run(() =>

                using (var stream = new FileStream(path.Path + @"\" + filename + ".xml", FileMode.Create))
                    var xml = new XmlSerializer(type);

                    //removes name spacing
                    XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
                    ns.Add("", "");

                    //serializes object
                    xml.Serialize(stream, obj, ns);

        //If the file already exists - append data to the existing file
            XElement xml = XElement.Load(path.Path + @"\" + filename + ".xml");

                new XElement("UserData",
                new XElement("first_name", firstName),
                new XElement("last_name", lastName),
                new XElement("email", email),
                new XElement("phone", phone),
                new XElement("birthday", birthday),
                new XElement("serial_number", serialID)

            using (var stream = new FileStream(path.Path + @"\" + filename + ".xml", FileMode.Create))


And it is written again this way:

public List<UserData> ReadUserDataFromXML(string filename)
        List<UserData> list = new List<UserData>();
        StorageFolder path = ApplicationData.Current.LocalFolder;
        string fullpath = path.Path + @"\" + filename + ".xml";
        XElement xml = XElement.Load(fullpath);

        list = (from data in xml.Elements("UserData")
                select new UserData()
                    FirstName = (string)data.Element("first_name").Value,
                    LastName = (string)data.Element("last_name").Value,
                    Email = (string)data.Element("email").Value,
                    Phone = (string)data.Element("phone").Value,
                    Birthday = (string)data.Element("birthday").Value,
                    SerialNumber = (string)data.Element("serial_number").Value

        return list;