How can I select the Value where id == id && key == key with Linq
xml:
<Localization>
<Module id="Customers">
<CultureCode>de-DE</CultureCode>
<Key>General</Key>
<Value>Allgemeine Kunden</Value>
</Module>
<Module id="Contract">
<CultureCode>de-DE</CultureCode>
<Key>General</Key>
<Value>Allgemeine Verträge</Value>
</Module>
</localization>
this my approach
methode(string module, string key)...
var value = (from l in localization.Elements("Localization").Elements("Module")
where l.Attribute("id").Equals(module) && l.Element("Key").Value.Equals(key)
select l.Element("Value").Value);