In my application, I need to convert a string that contains XML to RTF . The way I found to accomplish such a task is with the following code, which uses files instead of strings. So I would need to create a XLT , XSLT , RTF format file during . How can I do this?
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);