I am storing the string array content into a txt file and then trying to change the extension of the txt file to xml so as to make it read using XDocument.
Now the problem is that when I am trying to change the extension using the Path.ChangeExtension
method, it isn't changing the extension.
I have a task of sending data using WCF by only using string messages and I want to send an XML file. So I am dumping the XML file content into a string array and sending it over to the client. But my client is only able to read from XML file and that is the reason that I am trying to convert the string array into an XML file.
Also, the XML's structure is always going to be the same in every communication and of course only the data is going to change.
Please help me figure out how I can implement this.