XML is the standard extensible language, is the standard of the future Web programming, ASP is now widely circulated in one of the Web programming language, can you let them both together to play a role? Tofu is here to give you a very simple example of XML and XSL limited to space and knowledge level tofu is not here shortcoming. Here's how to start with a few files that need to be used.
testxsl.xsl:
Testxml.xml:
male
boy
Women
girl
Oh, 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))
%>
In contrast to this example, we mainly talk about the testxml.asp file
Set xml = Server.CreateObject ("Microsoft.XMLDOM")
Set xsl = Server.CreateObject ("Microsoft.XMLDOM")
Used to create an instance of XML and XSL separately, where Xml.load (Server.MapPath ("Testxml.xml") is used to load
The XML file that contains the data, Xsl.load (Server.MapPath ("testxsl.xsl")) to load the XSL containing the data rule
file, which ultimately uses Xml.transformnode (XSL) to use the preceding rule in the XML file.