Hi,
Below is the XML structure I have.
XML
Code
user 23-10-2016 22-10-2016 user1 23-10-2016 24-10-2016 user2 23-10-2016 22-11-2016Now I need to compare the EndDate node with today's date. If EndDate is lesser than today's date, then I need to remove the whole Details parent node. For Ex: Let's assume strDate a string that has today's date.
The below code takes all the values of EndDate and now, how can I compare the string value and loop through xml elements and delete them.
Code
object[] arr = xDos.Descendants("Details").Elements("EndDate"). Select(element => element.Value).ToArray();Now this whole portion should be deleted as of comparing with todays date.
Code
user 23-10-2016 22-10-2016Really appreciate any suggestions on this.

Midhun TpRank #388 · 6.5K reputationPosted Oct 23, 2016, 10:48 PM EDT