• 关键词:

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));
05-11 02:46