How to get all Names of last child elements of an xml file to a string array

I have an XML like this

<Node Name="segment_@85D819AE">
    <Node Name="segment_body37sub0">
        <Node Name="face_82C1EB14_4"/>
    </Node>
    <Node Name="segment_body37sub1">
        <Node Name="face_82C1ED90_5"/>
    </Node>
    <Node Name="segment_body37sub2">
        <Node Name="face_82C1EF38_6"/>
    </Node>
</Node>

I want to get on the following from the above XML.

face_82C1EB14_4
face_82C1ED90_5
face_82C1EF38_6

Basically all the Last elements in to a List

I am using c# Frame work 4.0.

Jon Skeet
people
quotationmark

It sounds like you're just trying to find the names of all elements with no child elements, then project from each of those elements to the Name attribute value:

var names = doc.Descendants() // Or Descendants("Node")
               .Where(x => !x.Elements().Any())
               .Select(x => x.Attribute("Name").Value);

people

See more on this question at Stackoverflow