<Root>
<Sub>
<Name>a</Name>
<Value>1</Value>
</Sub>
<Sub>
<Name>b</Name>
<Value>2</Value>
</Sub>
</Root>
How do I select the value of the Value element dependent upon the Name element?
Edit: In an XDocument, how do I get the value "1" when I have "a".