Parse XML using JavaScript (Modified Version)

Source: Internet
Author: User

This modified version is used to modify an article on the Internet.ArticleThe version that can be run later.

Title of the original article "Use ActiveX to search for and display XML data"

Error cause: if (I> items in getdatanext. length-1) I = 0; the error message is: "The data required to complete this operation is not available", but pressing >>or <button data is not displayed, I don't know where the problem is.

After modification, the script passes the test in Win8 + ie10.

Jsxml.html

<HTML> 

order. xml

<? XML version = "1.0"?> <Order> <account> 9900234 </account> <item id = "1"> <SKU> 1234 </SKU> <priceper> 5.95 </priceper> <quantity> 100 </quantity> <subtotal> 595.00 </subtotal> <description> super widget clamp </description> </item> <item id = "2"> <SKU> 6234 </SKU> <priceper> 22.00 </priceper> <quantity> 10 </quantity> <subtotal> 220.00 </subtotal> <description> mighty foobar flange </description> </item> <item id = "3"> <SKU> 9982 </SKU> <priceper> 2.50 </priceper> <quantity> 1000 </quantity> <subtotal> 2500.00 </subtotal> <description> deluxe doohickie </description> </item> <item id = "4"> <SKU> 3256 </SKU> <priceper> 389.00 </priceper> <quantity> 1 </quantity> <subtotal> 389.00 </subtotal> <description> muckalucket bucket </description> </item> <numberitems> 1111 </numberitems> <total> 3704.00 </Total> <orderdate> 07/07/2002 </orderdate> <ordernumber> 8876 </ordernumber> </order>

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.