I have a xmlNodeList as
<Fields>
<Field FieldId="1" Value="123" FieldTitle="id" FieldType="Text"/>
<Field FieldId="2" Value="abc" FieldTitle="First Name" FieldType="Text"/>
<Field FieldId="3" Value="efg" FieldTitle="Last Name" FieldType="Text"/>
</Fields>
now what I want is
var id = 123 //select the `value` if `FieldId == "1";
var firstName = abc //select the `value` if `FieldId == "2";
var last name = efg //select the `value` if `FieldId == "3";
Edit: I don't want to loop threw the fields and check every field with if condition.
One liner solution is most welcome.
NOTE: I am dealing with very large XML and the Fields is a part of single node and there are about 500 fields of thousand of nodes, any other better solution to convert this much larger XML file into insert queries is most welcome