I have a xml schema with nested xml elements and following is the small piece of that
<aa>
<id extension="xx" root="56" />
<name>demo</name>
<telecom use="emer" value="tel:34444" />
</aa>
<bb>
<value value="12345" />
</bb>
<cc>
<value value="234567" />
</cc>
From this, I have to get the value of "name tag" under "aa tag", last attribute (tel:) of telecom tag, and attribute value of the "value tag" (which is found under bb tag and cc tag)
I tried the following code, but it's not getting exactly what I am expecting.
xDoc.Descendants().Where(x => x.Name.LocalName.Equals("aa")
|| x.Name.LocalName.Equals("telecom") &&
(x.FirstAttribute.Equals("EC")
|| x.Name.LocalName.Equals("bb")
|| x.Name.LocalName.Equals("cc"))
Please provide the solution for this issue.