根据QTP的XML结果和在安装目录dat下的xsl文件,把结果转换为HTML格式。

public static void XMLToHTML()  
{  
    XslCompiledTransform xsl = new XslCompiledTransform();  
    xsl.Load(sPShortXSL); // load xsl file  
    XPathDocument xml = new XPathDocument(sResultXML); // Result xml file  
    XmlTextWriter writer = new XmlTextWriter(sPShortHTML, Encoding.GetEncoding("GB2312")); // Encode to GB2312 for display Chinese  
    xsl.Transform(xml, writer); // Complement transfor  
    writer.Close();  
}

 

相关文章:

  • 2022-12-23
  • 2021-11-13
  • 2021-09-28
  • 2021-09-20
  • 2021-09-16
  • 2021-12-23
  • 2021-08-07
  • 2021-12-20
猜你喜欢
  • 2021-08-14
  • 2022-12-23
  • 2021-09-02
  • 2021-05-18
  • 2021-10-31
  • 2021-12-15
  • 2022-12-23
相关资源
相似解决方案