I have XML file and I need to parse it and import data to database. I using XDocument to parse file, but there is question:
Sample of XML:
<a b="1">dfas</a>
<a b="2">qwsd</a>
<a b="3">egfs</a>
<a b="4">ghfg</a>
My code:
XElement tag;
record.A = tag.Element("a").Value;
I need to import to record. A value of element with attribute b=4. How can I do it? Thank you!
or
or