XML is a scale-up language and the scale of Web programming in the future. asp is one of the widely-spread web programming languages. can we enable them to work together? Here we will provide you with a very simple example about XML and XSL.
XML is a scale-up language and the scale of Web programming in the future. asp is one of the widely-spread web programming languages. can we enable them to work together? Here we will provide you with a very simple example of the limited length and knowledge of XML and XSL. the tofu is not here to show ugly. next we will first talk about the content of several files that need to be used.
TestXsl. xsl:
TestXML. xml:
Male
Boy
Female
Girl
Well, this is not easy to say.
Donot know
TestXML. asp
<%
Set xml = Server. CreateObject ("Microsoft. XMLDOM ")
Xml. async = false
Xml. load (server. mappath ("testXML. xml "))
Set xsl = Server. CreateObject ("Microsoft. XMLDOM ")
Xsl. async = false
Xsl. load (server. mappath ("testXSL. xsl "))
Response. Write (xml. transformNode (xsl ))
%>
Let's take a look at the testXML. asp file.
Set xml = Server. CreateObject ("Microsoft. XMLDOM ")
Set xsl = Server. CreateObject ("Microsoft. XMLDOM ")
Used to identify the creation of an xml and xsl instance. xml. load (server. mappath ("testXML. xml") is used to load
Xml file containing data. xsl. load (server. mappath ("testXSL. xsl") is used to load xsl containing data rules.
File. xml. transformNode (xsl) is used to apply the preceding rules to the XML file.