How to make Asp interact with XML

Source: Internet
Author: User
Making Asp interact with XML is a standard extension language and a standard for Web programming in the future. asp is one of the widely used web programming languages. can they be combined to play a role? Here we will provide you with a very simple example of the limited length and knowledge of XML and XSL. tofu is not here to show ugly. The following describes 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 create an xml and xsl instance respectively. 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, and use xml. transformNode (xsl) to use the preceding rules in the XML file.

    The preceding figure shows how to make Asp interact with XML. For more information, see other related articles in the first PHP community!

    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.