Hi,
I am having input xmls (which are always greater than 100 MB) and i am using MSXSL processor and VB Script in it. Further i am getting 7 different outputs by running seven times msxsl command line utility.
But if i run msxsl's command line utility i need to load same input file 7 times.
Since load times is always taking plenty of time everytime, i thought of loading it once and running it over 7 different xsl i.e. stylesheet and get seven different outputs.
My question here are
1) Can i do like this ?
2) How do i pass parameter to xsl ?
3) how do i load different xsl using same object ? (Attached a code here to do this but giving error)
4) how do i save the output ?
Current code:
Private Sub Form_Load()
Dim strParamVal As String
Dim strParamName As String
Dim myDoc As Object
Dim xmlDoc As New FreeThreadedDOMDocument30
Dim xslDoc As New FreeThreadedDOMDocument30
' Dim xslDoc1 As New FreeThreadedDOMDocument30 ' tried this but giving path not found error even if files is present there
Dim template As New MSXML2.XSLTemplate30
Dim processor As MSXML2.IXSLProcessor
Dim result As New DOMDocument30
'xslDoc.validateOnParse = True
'xmlDoc.validateOnParse = True
Debug.Print "Start time: " & Format(Now, "hh:mm:ss")
xslDoc.Load "C:\First.xsl"
Debug.Print "Time After loading stylesheet: " & Format(Now, "hh:mm:ss")
xmlDoc.Load "C:\1.xml"
Debug.Print "Time After loading inputFile: " & Format(Now, "hh:mm:ss")
Set template.stylesheet = xslDoc
Set processor = template.createProcessor
processor.input = xmlDoc
processor.Transform
Debug.Print processor.output
Debug.Print "Time After processing asset: " & Format(Now, "hh:mm:ss")
Set xslDoc = Nothing ' is this all right ?
xslDoc1.Load "C:\Second.xsl"
Debug.Print "Time After loading basic stylesheet: " & Format(Now, "hh:mm:ss")
Set template.stylesheet = xslDoc
Set processor = template.createProcessor
processor.input = xmlDoc
processor.Transform
Debug.Print processor.output
Debug.Print "Time After processing basic: " & Format(Now, "hh:mm:ss")
End Sub
Thanks in the anticipation that i will get some hint to solve this problem.
Regards,
Enter your message below
Sign in or Join us (it's free).