Detailed introduction (javascript+asp) XML, XSL conversion output HTML sample code

黄舟
Release: 2017-03-15 17:00:37
Original
1575 people have browsed it

Detailed introduction (javascript+asp)XML, XSL conversion output HTML sample code

code As follows:

<html> 
<body> 
<script language="javascript"> 
// Load XML 
var xml = new ActiveXObject("Microsoft.XMLDOM") 
xml.async = false 
xml.load("cd_catalog.xml") 
// Load the XSL 
var xsl = new ActiveXObject("Microsoft.XMLDOM") 
xsl.async = false 
xsl.load("cd_catalog.xsl") 
// Transform 
document.write(xml.transformNode(xsl)) 
</script> 
</body> 
</html>
Copy after login

Asp server conversion

The code is as follows:

<% 
&#39;Load the XML 
set xml = Server.CreateObject("Microsoft.XMLDOM") 
xml.async = false 
xml.load(Server.MapPath("cd_catalog.xml")) 
&#39;Load the XSL 
set xsl = Server.CreateObject("Microsoft.XMLDOM") 
xsl.async = false 
xsl.load(Server.MapPath("cd_catalog.xsl")) 
&#39;Transform the file 
Response.Write(xml.transformNode(xsl)) 
%>
Copy after login


The above is the detailed content of Detailed introduction (javascript+asp) XML, XSL conversion output HTML sample code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!