5
को देखते हुए निम्न XML है:XElement का चयन करें जहां बच्चे तत्व एक मूल्य
<platforms>
<platform>
<id>1</id>
<price>2.99</price>
</platform>
</platforms>
मैं एक XElement चाइल्ड तत्व "आईडी" के आधार पर वस्तु के रूप में तत्व "मंच" का चयन कर सकते हैं 1 की "एक मूल्य होने "?
मैं इतनी दूर मिल गया है:
XDocument xPlatformXml = new XDocument();
XElement xel = xPlatformXml.Element("platforms").Elements("platform").Where(x => x.Value == "1").SingleOrDefault();
लेकिन इसके लिए मूल्य "मंच" तत्व नहीं बल्कि "आईडी" से में होने की लग रही है।
आपकी मदद के लिए धन्यवाद –