I am unable to retrieve correct count of the nodes with attribute: IsTrue = "true" of my xml.
Code that I am using is :>>>
Array depCnfg = (from node in xml.Descendants(Qualities).Descendants()
where node.Parent.Name == Qualities &&
(node.Attribute(ISTRUE).Value.ToString().ToLower() == "true")
select {
totalCount = node.Nodes().Count()}).ToArray();
XML USED: >>>
<Qualities>
<General>
<Tag1 IsTrue = "true">
<SubTag1>0</SubTag1>
</Tag1>
<Tag2 IsTrue = "false">
<SubTag2>0</SubTag2>
</Tag2>
</General>
</Qualities>
Here I always get the count as 2 but actually it should be 1. If anyone have an idea please share...Thanks
node.Nodes(), not the nodes whereIsTrue == "true".