I have the following xml code and would like to fetch the sheltertype of value "Loft" and "Condos" under Shelters to list in Xelement.
<Shelters>
<Shelter>
<ShelterType>Loft</ShelterType>
<Price>250/500</Price>
<Area>250/500</Area>
<ScreenDisplayText>$250,000 / $500,000</ScreenDisplayText>
</Shelter>
<Shelter>
<ShelterType>TownHouse</ShelterType>
<Price>250/500</Price>
<Area>250/500</Area>
<ScreenDisplayText>$250,000 / $500,000</ScreenDisplayText>
</Shelter>
<Shelter>
<ShelterType>Condos</ShelterType>
<Price>250/500</Price>
<Area>250/500</Area>
<ScreenDisplayText>$250,000 / $500,000</ScreenDisplayText>
</Shelter>
<Shelter>
<ShelterType>apartment</ShelterType>
<Price>250/500</Price>
<Area>250/500</Area>
<ScreenDisplayText>$250,000 / $500,000</ScreenDisplayText>
</Shelter>
---
</Shelters>
I tried with Descendants and I got null value. Looking for Linq with XElement to work on it. Kindly help.