I have an XElement which contains similar nodes but different values.
Like my XElement
look like this
<Information>
<Emp>
<A.EMPLID>1</A.EMPLID>
<A.Phone>12##</A.Phone>
</Emp>
<Emp_Add>
<B.ID>125</B.ID>
<Add>XXXXXXX</Add>
</Emp_Add>
<Emp_Add>
<B.ID>1256</B.ID>
<Add>ZZZZZZ</Add>
</Emp_Add>
</Information>
Actually I need to go through each <Emp_Add>
node - pick up the value of <B.ID>
and compare it with <Emp>.<A.EMPLID>
value. If values are same then display message "Values matched"
else message "Values does not match"
using C# code.
How to use for each loop and compare for such XElement
.