Comment puis-je obtenir le premier élément après élément avec LINQ-to-XML?

Avec ce code je peux obtenir le titre de le fichier XML suivant:

var xml = XElement.Load (@"C:\\test\\smartForm-customersMain.xml");
string title = xml.Element("title").Value;

Mais comment puis-je le rendre plus exact, par exemple, "obtenir le premier élément après la smartForm élément, par exemple, quelque chose comme ceci:

//PSEUDO-CODE:
string title = xml.Element("smartForm").FirstChild("title");

XML:

<?xml version="1.0" encoding="utf-8" ?>
<smartForm idCode="customersMain">
    <title>Customers Main222</title>
    <description>Generic customer form.</description>
    <area idCode="generalData" title="General Data">
        <column>
            <group>
                <field idCode="anrede">
                    <label>Anrede</label>
                </field>
                <field idCode="firstName">
                    <label>First Name</label>
                </field>
                <field idCode="lastName">
                    <label>Last Name</label>
                </field>
            </group>
        </column>
    </area>
    <area idCode="address" title="Address">
        <column>
            <group>
                <field idCode="street">
                    <label>Street</label>
                </field>
                <field idCode="location">
                    <label>Location</label>
                </field>
                <field idCode="zipCode">
                    <label>Zip Code</label>
                </field>
            </group>
        </column>
    </area>
</smartForm>

OriginalL'auteur Edward Tanguay | 2009-08-03