Hello
Beginners question! I need some help regarding writing XML to a file using C#
I am currently outputting my XML to a file directly using
KeywordsDataXML = new XmlTextWriter(keywordCacheLocationFile, Encoding.UTF8);
This working fine, however I now need to examine the results of each node before I output them to the file. So I thought I would output to a memory stream first using
XmlTextWriter tempKeywordsDataXML = null; //MG
MemoryStream ms = new MemoryStream(); //MG
tempKeywordsDataXML = new XmlTextWriter(ms, Encoding.UTF8);
However I am now having problems transferring the contents of the memorystream (tempKeywordsDataXML) to the file (KeywordsDataXML)
Sorry to be posting quite a basic question but I'm new to this - any help is appreciated.
Thanks.
Beginners question! I need some help regarding writing XML to a file using C#
I am currently outputting my XML to a file directly using
KeywordsDataXML = new XmlTextWriter(keywordCacheLocationFile, Encoding.UTF8);
This working fine, however I now need to examine the results of each node before I output them to the file. So I thought I would output to a memory stream first using
XmlTextWriter tempKeywordsDataXML = null; //MG
MemoryStream ms = new MemoryStream(); //MG
tempKeywordsDataXML = new XmlTextWriter(ms, Encoding.UTF8);
However I am now having problems transferring the contents of the memorystream (tempKeywordsDataXML) to the file (KeywordsDataXML)
Sorry to be posting quite a basic question but I'm new to this - any help is appreciated.
Thanks.