Hello, there is a big XML file, more than 500000 records, often you have to pull correction information from it. not to load the file completely and use linq to filter the records.
<root> <esrs> <rc int_ESR="-1594" str_Name="ПОБОЖИЙ"/> <rc int_ESR="-1593" str_Name="ФЕДОСЕЕВ"/> <rc int_ESR="-1592" str_Name="ГЛУХАРИНЫЙ"/> </esrs> Download code for all stations:
public IEnumerable<Station> SetResponse(XDocument xmlDoc, IEnumerable<Station> stationValid) { var listStationsNameQuery = from train in xmlDoc.Descendants("rc") select new { Esr = (string)train.Attribute("int_ESR"), Name = (string)train.Attribute("str_Name"), }; } And I need to load only the stations specified in stationValid by equality of the ESR code? Tell me how to make such a limitation on Linq request?