I have some code that I need to put into a string list in C# and I am reading this code from an XML files and the layout of it is something like below...
<?xml version="1.0"?>
<accountlist>
    <main>
        <account id="1" special_id="4923959">
            <username>Adam</username>
            <motto>Hello Everyone>
            <money>1004</money>
            <friends>394</friends>
            <rareid>9</rareid>
            <mission>10</mission>
        </account>
    </main>
</accountlist>
How can I put each account tag into a string list? from the first < account > to the < / account > tag?
Please do NOT tell me to go to the link below as it does NOT work!! How to read a XML file and write into List<>?
So far I have tried the below code, and the string list just stays empty
XDocument doc = XDocument.Parse(this._accountsFile);
            List<string> list = doc.Root.Elements("account")
                               .Select(element => element.Value)
                               .ToList();
            this._accounts = list;