Get attribute values with LINQ to XML
If you don't want create a full-blown xml serializer (I wouldn't if it was a simple as that) all you can do is to just tide this up. This is, add a helper variable for dataItems and create a helper extension for finding elements based on the Name attribute. Then you can remove all the other intermediate viariables and directly assign the values to the properties because this is pretty short right now.

public static string ValueWhereName(this IEnumerable&lt;XElement&gt; sournce, string name)
{
    return sournce.SingleOrDefault(i =&gt; i.Attribute("name").Value.Equals(name))?.Value;
}


and use it like this:

var query =
    from item in dataRows
    let dataItems = item.Elements("DataItem")
    select new
    {
        Symbol = dataItems.ValueWhereName("SYMBOL"),
        CompName = dataItems.ValueWhereName("NAME"),
        Cusip = dataItems.ValueWhereName("CUSIP"),
        Sedol = dataItems.ValueWhereName("SEDOL")
    };


If you had a dedicated class for the result you could make it even more robust by using nameof(YourClass.Symbol). But then the properties would have to have the same names as the attributes or you would need to decorate them with your own attributes and use some reflection... You would also need to modify the Equals(name, StringComparison.OrdinalIgnoreCase) call to ignore-case sind the properties obviously wouldn't match the xml attributes casewise.



Another option could be the package Json.NET as it's also able to parse xml but I'm not sure how it could handle the attributes.