Home arrow XML arrow XML Responses and AJAX
XML

XML Responses and AJAX


In a previous tutorial we looked at the responseText property of the XMLHTTP Request. This tutorial will focus on the responseXML accessor.

Author Info:
By: Jayaram Krishnaswamy
Rating: 4 stars4 stars4 stars4 stars4 stars / 40
February 27, 2006
TABLE OF CONTENTS:
  1. · XML Responses and AJAX
  2. · A brief explanation of innerHTML
  3. · AJAX returning an XML document
  4. · A Quick look at XMLDOM
  5. · Student Nodes Collection

print this article
SEARCH DEVARTICLES

XML Responses and AJAX
(Page 1 of 5 )

Introduction

If the response is XML, the responseXML represents the value derived via DOM object parsing. The reader should review the properties and methods discussed in my previous tutorials on AJAX and XMLDOM, so that reading this one will be easier. JavaScript works easily with the XMLDOM object. In this tutorial we will be accessing an XML document via AJAX.

The two tasks of the XMLHttp are handling the HTTP request, and then processing the XML response. The first one is easily done by writing the appropriate syntax for creating this object. The second is achieved via reference to XMLDOM.

var xhr=new ActiveXObject("Microsoft.XMLHTTP");

is the correct syntax for the Internet Explorer and

var xhr=new XMLHttpRequest();

for the Mozilla Browser.


blog comments powered by Disqus
XML ARTICLES

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials