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
let null_TE = query.Descendants("TE.TE").FirstOrDefault()
- Using LINQ to delete an element from a ObservableCollection Source
- LINQ Source Code Available
- .NET 4 Code Contracts: "requires unproven: source != null"
- creating Linq to sqlite dbml from DbLinq source code
- source code for LINQ 101 samples
- List or Array of String Contain specific word in Html Source Code
- c# Linq or code to extract groups from a single list of source data
- how to write code to find element in directory in Linq
- Convert string to int in one line of code using LINQ
- Code equivalent to the 'let' keyword in chained LINQ extension method calls
- Check if list contains element that contains a string and get that element
- Value cannot be null. Parameter name: source
- How to get the index of an element in an IEnumerable?
- How to take all but the last element in a sequence using LINQ?
- C#/Linq: Apply a mapping function to each element in an IEnumerable?
- Sequence contains more than one element
- Sequence contains no matching element
- Linq code to select one item
- C# - code to order by a property using the property name as a string
- How do I find the text within a div in the source of a web page using C#
- Roslyn failed to compile code
- How to remove the first element in an array?
- Get List<> element position in c# using LINQ
- Entity-framework code is slow when using Include() many times
- The data source does not support server-side data paging
- How are people unit testing code that uses Linq to SQL
- Random element of List<T> from LINQ SQL
- Entity Framework, Code First and Full Text Search
- Finding first index of element that matches a condition using LINQ
- Check for any element that exists in two collections
- Find items from the list based on given date
- How to filter a collection using LINQ to DataSet
- Will this call GetEnumerator() More than Once?
- Cannot find the right method to call in a deferred LINQ statement
- LINQ generate serial number
- Sorting a list of <Object> with VB and LINQ
- Is there any benefit in using Predicate<T> over building a query manually?
- Getting multiple records for same value in JSON
- Linq group by and then get only one of the items
- Optimized way to select items from a Collection excluding a list of certain member using Linq
- Select random images using Linq/C#?
- LINQ for getting all entries of a IEnumerable<string> which start with the same characters
- Nested Expression method call in Linq.Select()
- Can one use a list to find a collection of rows in a query?
- c# linq SELECT list inside another list
- Compare Two List<Objects>
- Convert VBNet LiNQ to C#
- How do I build Expression Call for Any Method with generic parameter
- When is ObjectQuery really an IOrderedQueryable?
- How to construct a having statement in linq with a max value?