private void _showEvidence(string assemblyName) { try { ////////// // Load the request in a dom ////////// MSXML2.FreeThreadedDOMDocument _xmlDoc = new MSXML2.FreeThreadedDOMDocumentClass(); // Dominick's Additions (Jason's idea) Assembly a = Assembly.LoadFrom(assemblyName); string evidence = string.Format("<evidence assembly='{0}'>", a.GetName().Name); foreach (object o in a.Evidence) { evidence += o.ToString(); } evidence += "</evidence>"; _xmlDoc.loadXML(evidence); //_xmlDoc.load(this._ofd.FileName); ////////// // Create an xslt processor based on the default xml display stylesheet ////////// MSXML2.IXSLProcessor _xslProcessor = this._defaultStylesheet.createProcessor(); _xslProcessor.input = _xmlDoc; ////////// // Run the transform ////////// _xslProcessor.transform(); ////////// // Write the result into an IStream implementation ////////// AxMemoryStream _axStream = new AxMemoryStream(); TextWriter _writer = new StreamWriter(_axStream); _writer.Write(_xslProcessor.output.ToString()); _writer.Flush(); _axStream.Seek(0, SeekOrigin.Begin); ////////// // Use IPersistStreamInit to load the html into the browser ////////// this._documentObject.InitNew(); this._documentObject.Load(_axStream); } catch (Exception _ex) { MessageBox.Show(_ex.ToString()); } }
public override void TransformFileToFile(XMLUtilities.XSLParameter[] parameterList, string sInputPath, string sOutputName) { m_xmlDoc.load(sInputPath); m_xslProc = m_xslt.createProcessor(); m_xslProc.input = m_xmlDoc; AddParameters(parameterList); m_xslProc.transform(); StreamWriter sr = File.CreateText(sOutputName); sr.Write(m_xslProc.output); sr.Close(); }