I have the XML in the below form.
<TxLife>
<Policy>
<PolNumber>BB1062632</PolNumber>
<FirstName>EWAN</FirstName>
<LastName>MCKENZIE</LastName>
<BirthDate>1972-03-08</BirthDate>
<MailType>ABC</MailType>
</Policy>
<Policy>
<PolNumber>BB1234567</PolNumber>
<FirstName>TEST</FirstName>
<LastName>ONE</LastName>
<BirthDate>1972-03-08</BirthDate>
<MailType>DEF</MailType>
</Policy>
</TxLife>
I have written the code to fetch the value in string array with the below code:
string[] arr = doc.Descendants("PolNumber").Select(element => element.Value).ToArray();
But not sure how to get individual values and store in variable