Hi
I am using xml and xslt for generate MS word doc.
In xml there is a attribute <Comment></Comment>
This comment attribute contains Rich text(HTML formatting) and this attribute is populated dynamically.
I generate doc by using following function
public static byte[] CreateWord(XmlReader xmlData, XmlReader xsltReader)
{
// Initialize needed variables
XslCompiledTransform xslt = new XslCompiledTransform();
XsltArgumentList args = new XsltArgumentList();
using (MemoryStream swResult = new MemoryStream())
{
// Load XSLT to reader and perform transformation
xslt.Load(xsltReader);
xslt.Transform(xmlData, args, swResult);
return swResult.ToArray();
}
}
When i create the word document the HTML formatting is removed. The comments are written in document in Plain text format.
Can anyone tell me how to fix this? Any help is greatly appreciated.