|
|
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
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.
|
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
|