[Home] [By Thread] [By Date] [Recent Entries]
I am using asp to load in xml and xsl files to create an output. I am using the msxml parser, and for single xml files I am using the following asp code: set objXml = Server.CreateObject("MSXML2.FreeThreadedDOMDocument") objXml.async = false objXml.load(Server.MapPath(srcXml)) set objXsl = Server.CreateObject("MSXML2.FreeThreadedDOMDocument")
objXsl.async = false
objXsl.load(Server.MapPath(srcXsl)) 'add parameters to the xsl
Set objXSLTemplate = Server.CreateObject("MSXML2.XSLTemplate")
Set objXSLTemplate.stylesheet = objXsl
Set prXSLT = objXSLTemplate.createProcessorI need to use something similar to this but with multiple xml files, I don't want to use the document() functionality, as I need to dynamically set the xml files to load through the asp code. I've found the following code that will load in an xml file through the asp (well VB): Dim xmlXSLT as New MSXML2.FreeThreadedDOMDocument40 Dim xslTemplate as New MSXML2.XSLTemplate40 Dim xprProcessor as IXSLProcessor xmlXSLT.load("c:\temp\MyTransform.xsl")
' don't forget to check for parseError!
Set xslTemplate.stylesheet = xmlXSLT.documentElement
Set xprProcessor = xslTemplate.createProcessor With xslTemplate
.input = xmlSource
.output = xmlResult
.addParameter "DocPath", "c:\temp\MyDoc.xml"
.transform
End WithIs this the best way to load in multiple xml files? Does anyone have an example of vb script code that loads an array of multiple/dynamic xml files and transforms them using 1 xsl file? Any help would be appreciated. The end result will be a press release style list that gets summary information from different xml files, based on their dates. Cheers, Kate
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



