take this linq into consideration:
list.Where(sil => sil.XML.Element("ticket") != null && sil.XML.Element("ticket").Attribute("id").Value == smsRequestIn.TicketID)
if the "ticket" element is not null it searches for it twice and hence is not very effective. Is there a way to use some sort of variables within the linq expression so I can reference the variable instead of doing a double search for the "ticket" element or is linq intelligent enough to not do a double search?