>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

Ajax Quick start tutorial II -Handling xml response - xml response ajax quick start tutorial html post

 
Registered tutorials: 501
Registered Users: 37386



Rating: 0 out of 0 votes cast


  
Category: Ajax and PHP

Ajax Quick start tutorial II -Handling xml response

Digg this   Post to del.icio.us

Abstract: shows how to receive xml response from server side script[PHP], and how to parse through the XML data in client side Javascript.

Scenario:
Depending on the variable passed, php file will generate an xml response. In this case, city name and population of a city in California is passed to PHP.The xml response from server is fetched into client through an Ajax call, which is then parsed to dig out city name and population values.

Explanation: Everything is just the same as in first example except:

  • Now we use responseXML instead of responseText, so that javascript handles the response as an XML Object instead of just a plain string
  • Once xml response is recieved, its parsed through to extract data. The example shows two most important tasks of an xml parser.Extract nodevalues, and attribute values.

Read Full Tutorial...



Reviews:

Rate and Review This Site

No reviews yet


Statistic Information About this Resource:


Total Hits: 271
Unique Hits: 247


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 0.3 0.3 1.5 1.6 10.7 11.5
Current 0 0 1 1 8 9
Previous 0 0 7 8 7 7
Feb 11 1 1 0 0 8 9
Feb 10 0 0 3 3 18 18
Feb 9 0 0 0 0 19 22
Feb 8 0 0 3 3 9 9
Feb 7 1 1 0 0 11 12
Feb 6 0 0 1 1 19 19
Feb 5 1 1 0 0 8 10
Feb 4 0 0 0 0 0 0
Highest 5 5 9 9 23 25


Script Execution Time: 0.16255 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2