Q: C# Get one XML element value when another is a specific value Is there a possible way within C# to get the value of the <PropertyID> node only when <IsDisabled> is equal to 0?
If not, how would I be able to parse out the PropertyIDs that have an IsDisabled value of 0?
I've been beating myself up with this all day so any help would be appreciated.
I have attached an example snippet of my XML below. I have condensed it significantly and there are many with a value of 1 and many with 0.
<response>
  <code>200</code>
  <result>
    <PhysicalProperty>
      <Property>
        <PropertyID>325213</PropertyID>
        <MarketingName>XXXXX</MarketingName>
        <Type>Student</Type>
        <IsDisabled>1</IsDisabled>
        <IsFeaturedProperty>0</IsFeaturedProperty>
      </Property>
    </PhysicalProperty>
  </result>
</response>


A: Yes, LINQ makes it pretty easy to do these types of queries against XML    
var propertyIds = XDocument.Parse(myXmlString)
                           .Descendants("Property")
                           .Where(p => p.Element("IsDisabled").Value == "0")
                           .Select(p => p.Element("PropertyID").Value);

