score:3

Accepted answer

Your code assumes that <TE.TE> is a direct child of <Lemma>, which it is not. Rather, <TE.TE> is a child of <TE>, which is a child of <Sense>, which is a child of <Lemma>. Your code should be adapted like so:

let null_TE = query.Element("Sense").Element("TE").Element("TE.TE")

For simplicity, you could, as jimmy_keen suggests, use Descendants:

let null_TE = query.Descendants("TE.TE").FirstOrDefault()

Related Articles