关键词:
XName
XElement
Descendance()
node.Name.LocalName
示范:
List<ClaimSheetBaseDto> list = new List<ClaimSheetBaseDto>(); foreach (var csb in model) { if (csb.DetailsXml != null) { foreach (var node in csb.DetailsXml.Descendants()) { if (node.Name.LocalName == "ModelTemplateName" && node.Value.Contains(Cache_QueryConditionsModel.SalaryTemp)) { list.Add(csb); break; } } } } var souce = list.AsQueryable(); return View("Index", souce.ToPagedList(pageIndex, pageSize));
时间: 2024-10-27 03:12:56