Hi,
Below is the XML structure I have.
XML
user 23-10-2016 22-10-2016 user1 23-10-2016 24-10-2016 user2 23-10-2016 22-11-2016 Now 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.
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.
user 23-10-2016 22-10-2016 Really appreciate any suggestions on this.
Midhun TpPosted Oct 24, 2016, 2:48 AM