XslTransformTransform 方法将结果输出到字符串里有中办法 通过SystemIOMemoryStream类来实现 通过SystemTextStringBuilder类来实现 下面是具体的实现方法 SystemXmlXslXslTransform RssXslt = new SystemXmlXslXslTransform(); SystemXmlXmlDocument RssXml = new SystemXmlXmlDocument(); RssXsltLoad(ServerMapPath(RssReaderxslt)); RssXmlLoad(ServerMapPath(Rssxml)); SystemIOMemoryStream t = new SystemIOMemoryStream(); RssXsltTransform(RssXmlnulltnull); string resultString = SystemTextUTFEncodingUTFGetString(tToArray()); ResponseWrite(resultString); SystemXmlXslXslTransform RssXslt = new SystemXmlXslXslTransform(); SystemXmlXmlDocument RssXml = new SystemXmlXmlDocument(); RssXsltLoad(ServerMapPath(RssReaderxslt)); RssXmlLoad(ServerMapPath(Rssxml)); SystemTextStringBuilder t = new SystemTextStringBuilder(); RssXsltTransform(RssXmlnullnew SystemIOStringWriter(t)null); string resultString = tToString(); ResponseWrite(resultString); |