|
sResultsXML=_
"C:\Program Files\Mercury Interactive\QuickTest Professional\Tests\Test20\Res1\Report\Results.xml"
sDetailedXSL="C:\Program Files\Mercury Interactive\QuickTest Professional\dat\PDetails.xls"
ApplyXSL sResultsXML,sDetailedXSL,"c:\result.html"
Public Function AppXSL(ByVal inputXML,ByVal inputXSL,ByVal outputFile)
sXMLLib="MSXML.DOMDocument"
Set xmlDoc = CreateObject(sXMLLib)
Set xslDoc = CreateObject(sXMLLib)
xmlDoc.async = False
xslDoc.async = False
xslDoc.load inputXSL
xmlDoc.load inputXML
outputText = xmlDoc.transformNode(xslDoc,documentElement)
outputText = Replace(outputText,"UTF-16","GB2312")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set outFile = FSO.CreateTextFile(outputFile,True)
outFile.Write outputText
outFile.Close
Set outFile = Nothing
Set FSO = Nothing
Set xmlDoc = Nothing
Set xmlResults = Nothing
End Function
类型不匹配: 'ApplyXSL' |
|