I am trying to parse an XML RSS feed need to convert the date in an element from this:
<lastBuildDate>Thu, 13 Apr 2017</lastBuildDate>
to this:
<lastBuildDate>Thu, 13 Apr 2017 09:00:52 +0000</lastBuildDate>
I am able to get hold of the lastBuildDate
element with the following code
XmlTextReader reader = new XmlTextReader(rssFeedUrl);
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element && reader.Name.Contains("BuildDate"))
{
// replace DateTime format
}
}
I don't know how to get the value of the text in the element & then replace it with the correct format - can anyone help?