电脑故障

位置:IT落伍者 >> 电脑故障 >> 浏览文章

如何将结果输出到字符串里


发布日期:2023/10/6
 
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);

上一篇:Cookie太大导致页面无应答的问题

下一篇:用VB设计自己的E-mail系统