我在这里找到了可能的答案:http
:
//web.archive.org/web/20130329123237/http
:
//www.csharpfriends.com/Articles/getArticle.aspx?articleID=63
从文章:
XPathdocument myXPathDoc = new XPathdocument(myXmlFile) ;XslTransform myXslTrans = new XslTransform() ;myXslTrans.Load(myStyleSheet);XmlTextWriter myWriter = new XmlTextWriter("result.html",null) ;myXslTrans.Transform(myXPathDoc,null,myWriter) ;编辑:
但是我可信赖的编译器说过时了
XslTransform:
XslCompiledTransform改用:
XPathdocument myXPathDoc = new XPathdocument(myXmlFile) ;XslCompiledTransform myXslTrans = new XslCompiledTransform();myXslTrans.Load(myStyleSheet);XmlTextWriter myWriter = new XmlTextWriter("result.html",null);myXslTrans.Transform(myXPathDoc,null,myWriter);


