I need help on how to "automatically" delete a node based on timestamp. A particular date is defined by the user inside a xml document e.g. 17/9/2006 Can someone provide me an example? Thanks in advance!
<root>
<element>
</element>
<timestamp time="2016-09-16T13:45:30">
</timestamp>
<--how do I delete element based on the given timestamp?-->
</root>
//UNTESTED CODE
XDocument doc = XDocument.Load("time.xml");
var name = doc.Descendants("root")
.Where(n => n.Attribute("time").Value == "2016-09-16T13:45:30")
.Select(n => (string)n)
.First();
<--how can I delete it based on timestamp-->
name.Element("element").Remove();