0
In my application, I need to convert a string that contains XML for RTF. The way I found to accomplish such a task is with the following code below, which uses files instead of strings. Then I would need to create during Runtime a file for format: XLM, XSLT, RTF. How can I do that?
string string_xlm = "conteúdo qualquer";
string string_xslt = "conteúdo qualquer";
//criar arquivo doc_xml com conteúdo da string_xlm
//criar arquivo doc_xslt com conteúdo da string_xslt
//criar arquivo doc_rtf vazio
/*----------------------------------------------------*/
XslCompiledTransform xml2rtf = new XslCompiledTransform();
xml2rtf.Load(doc_xslt);
xml2rtf.Transform(doc_xml, doc_rtf);
/*----------------------------------------------------*/
string string_rtf = System.IO.File.ReadAllText(doc_rtf);