DSO (downloadable instance code)

Source: Internet
Author: User
Tags xslt

 

CodeDownload

 

ArticleSummary:

    • Related concepts;
    • Use of recordset;
    • Use XML data island and XSLT to convert the output style;

I. Several simple concepts:

    1. DSO (data source object): xml dso is a Microsoft ActiveX Control embedded in Microsoft Internet Explorer;
    2. XML data island: the XML data bound between the <XML> and </XML> tags is called XML data island;

 

     

    2. DSO stores all records in the recordset object, and the attributes and methods of the recordset object can be used for Operation Records. The following instance feels similar to detalsview:
    <! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTML xmlns = "http://www.w3.org/1999/xhtml"> Similar to the gridview implementation:
    
     
    <XML src = "books. XML "id =" mybook "> </XML> <Table datasrc =" # mybook "border =" 1 "> <thead> <tr> <TD> name </TD> <TD> author </TD> <TD> price </TD> </tr> </thead> <tr> <TD> <Div dataworks = "title"> </ div> </TD> <Div dataworks = "authorname"> </div> </TD> <Div dataworks = "price"> </div> </TD> </tr> </table>

    3. Convert the output style:

    First, two XML data islands are required.
     
    <XML src = "books. xml" id = "mybook"> </XML> <XML src = "effectfile. XSLT" id = "stylesheet"> </XML>

    Then

    VaR xmldso = mybook. xmldocument; var xsldso = stylesheet. xmldocument; divresults. innerhtml = xmldso. transformnode (xsldso );

    Final output:

    philosophy Marx 100 Computer Science and Technology Bill Gates 200 . net crayon 150

    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.