JavaScript Ajax-4 XML parsing (XML in JavaScript, Ajax back and parsing XML)

Source: Internet
Author: User

First, the XML in JavaScript


XML DOM Object

-IE Browser gets XML DOM object via ActiveXObject object

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/7A/wKioL1cCM0WzFkfNAAAnACW7rzc219.png "title=" Web.png "alt=" Wkiol1ccm0wzfkfnaaanacw7rzc219.png "/>

-Other browsers get XML DOM objects through Domparser objects

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7E/7E/wKiom1cCMrzRHezAAAA4o5lQLYY162.png "title=" Web.png "alt=" Wkiom1ccmrzrhezaaaa4o5lqlyy162.png "/>

Support for XML DOM objects

-XML DOM (XML document Object Model) defines a standard way to access and manipulate XML documents

-DOM views the XML document as a tree structure. Ability to access all elements through the DOM tree

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7E/7E/wKiom1cCM6vBNHX0AACgLuQkKIY048.png "title=" Web.png "alt=" Wkiom1ccm6vbnhx0aacgluqkkiy048.png "/>

Loading and parsing XML strings

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7E/7A/wKioL1cCNIXQSomNAAHNW1KgW2A855.png "title=" Web.png "alt=" Wkiol1ccnixqsomnaahnw1kgw2a855.png "/>



Second, AJAX returns and parses XML


Sending an XML string using XHR

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/7E/wKiom1cCNC6ybMr1AAF19crTWoU265.png "title=" Web.png "alt=" Wkiom1ccnc6ybmr1aaf19crtwou265.png "/>


Using XHR to accept XML strings

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7E/7E/wKiom1cCNF-iA5iIAAFFWLi8BlQ747.png "title=" Web.png "alt=" Wkiom1ccnf-ia5iiaaffwli8blq747.png "/>


Summary: This chapter covers XML parsing (XML in JavaScript, AJAX returns, and parsing XML)


This article from the "Flying Ants" blog, declined to reprint!

JavaScript Ajax-4 XML parsing (XML in JavaScript, Ajax back and parsing XML)

Related Article

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.