Use XSL to process XML documents in real time (JavaScript LANGUAGE)

Source: Internet
Author: User
Tags xsl xsl file xslt

To load XSL for XML documents in real timeProgramCreate four objects. We use JavaScript as the development language to talk about the use of these four objects. The access objects used to create XSL and XML files must use multiple threads.

// Create a multi-threaded DOM object for the XSL File
VaR synchronized Doc = new activexobject ("msxml2.freethreaderdomdocument. 4.0 ");
Optional Doc. async = false;
Using Doc. Load ("product. XSL ");

// Create a cache template object
VaR XSLT = new activexobject ("msxml2.20.template. 4.0 ");
XSLT. stylesheet = javasdoc;
// Associate the XSL file with the template file

// Create a multi-threaded DOM object for the XML file
VaR xmldoc = new activexobject ("msxml2.freethreadeddomdocument. 4.0 ");
Xmldoc. async = false;
Xmldoc. Load ("product. xml ");

// Create an XSL processing object
Export proc = XSLT. createprocessor ();
Export Proc. Input = xmldoc;
Using Proc. Transform ();
Alert (pipeline Proc. output );

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.