Click here to Skip to main content
15,882,152 members
Articles / Programming Languages / Javascript
Tip/Trick

XSLT transformation with the Processor object

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
14 Sep 2011CPOL 13.9K  
How to do XSLT transformation with the Processor object

In order to optimize XSLT transformation in Internet Explorer, you can use the Processor object. See this example:

JavaScript
var xml = new ActiveXObject("Microsoft.XMLDOM");
var xslt = new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
   
xml.load("data.xml");
xslt.load("transformxsl.xml");
   
var processor   = new ActiveXObject("Msxml2.XSLTemplate");
processor.stylesheet = xslt;

var objXSLTProc = processor.createProcessor();
objXSLTProc.input = xml;
objXSLTProc.transform();

I wrote about the performance of XSLT transformation in Internet Explorer here.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Superderivatives
Israel Israel
I’m a .net architect, focusing mainly on
writing a scalable components, My expertise is designing for optimal performance and scalability. Always in search
of new knowledge and ambitions.

Specialties
Design Patterns, UML, OOP/OOD, .NET, C#, C++, STL, ATL, COM/COM+, VB/VB.NET, IIS, ISAPI,ASP/ASP.NET, WebServices, WCF,HTML/JavaScript, Ajax, XML/XSL/XSD, SQL

Personal blog gregnozik.blogspot.com

Comments and Discussions

 
-- There are no messages in this forum --