Design and create an xml document

Assignment Help PHP Web Programming
Reference no: EM131917061

1 Objectives covered in this laboratory

- Practise to use XMLHttpRequest
- Practise to use DOM to search and change an XML document

2 Exercises

a) Copy the code of the "Contacts, Calendar, Advert" XHR example from Blackboard. These files are contained in Lec6Examples.rar under Lectures on Blackboard.

In this example, amend the example so that it "works" synchronously. Run in IE and Firefox. How does this behaviour change (if at all)? Now, add a 3 seconds delay in display.php using "sleep(3);". Run the example again and check whether there is an obvious change.

b) Copy the code of the "Hotel Booking" XHR example from Blackboard. These files are also located in Lec6Examples.rar under Lectures on Blackboard. Add some more hotel data, so that every city is covered, and that some category / city pairs have at least 3 hotels. Ensure that these hotels are not listed in the XML file in increasing order of price. Now, amend the code for the example to ensure that if there is more than one hotel to be displayed, they are displayed in order of increasing price (see Figure 1).

507_sorted hotel list.jpg

Figure 1 sorted hotel list

c) Design and create an XML document to record the maximum temperature details for Melbourne. Data to be stored for each entry is:
• Day (use a number eg 2)
• Month (use a number eg 9)
• Year (use 4 digit number eg 2009)
• Max temperature (in degrees C - eg 24.0)

Your data file should include just the data for 1 to 7 April 2013. Temperature data to be used is: 24.0, 21.9, 24.4, 25.8, 26.9, 25.3, 25.7

Read and manipulate the XML file to display, in the client, the dates and temperature figures, one to a line, with the average maximum temperature given below (see Figure 2). You must use Ajax techniques to get the XML data to the client, and must use the DOM API to extract, calculate and then display the relevant details.

 

356_Request temperature xml.jpg

Figure 2 request temperature xml

d) Copy the code of the simpleajax example from Blackboard. These files are in Lec1Examples.rar under Lectures on Blackboard. Change the code to allow three XHR requests as shown in Figure 3.

698_Extension of the Simple Ajax example.jpg

Figure 3 Extension of the Simple Ajax example for handling multiple requests

Reference no: EM131917061

Questions Cloud

How christy can handle the situation better the next time : Describe how Christy can handle the situation better the next time she encounters a Romani patient.
Pick a synthetic material : Pick a synthetic material (like nylon or PVC or one of the hundreds of other ones) and discuss what the possible toxic chemicals it would produce in a fire.
Discuss potential advantages of mixed research methodology : Discuss the potential advantages and disadvantages of mixed research methodology for your dissertation topic or topic area my research topic is.
Explain what economies of scale is : What are the differences between business and corporate level strategies. Explain what Economies of Scale is.
Design and create an xml document : COS30020/COS80021 Web Application Development - Design and create an XML document to record the maximum temperature details for Melbourne
Target capital structure of common stock : Phoenix Inc. has a target capital structure of 60 percent common stock and 40 percent debt.
Identify the steps in human resources planning : Identify the steps in human resources planning and why these steps are so important for organization being sucessful?
Concentration of the dilute solution : In the laboratory you dilute 2.83 mL of a concentrated 3.00 M hydrochloric acid solution to a total volume of 100 mL.
Analyze what were you hoping to achieve by making decision : Analyze What were you hoping to achieve by making this Decision? Support your response with evidence and references to the Learning Resources.

Reviews

Write a Review

PHP Web Programming Questions & Answers

  Random integral numbers based on normal distribution

Prepare a system to generate random integral numbers based on normal distribution. Study Data Generator's structure and extend number generation type to activate normal distribution.

  Shopping cart program for web applications class

Shopping Cart program for web applications class. Allows user to browse while keeping track of the items in which they will purchase at the end on the order page link and this will give a final price for all items.

  Create a web site for an apple farm

Create a web site for an apple farm. Create an HTML5 form allowing visitors to create an account with the site. Account details are to be stored in your MySQL database. Information should be stored in a secure way.

  Develop a dynamic website open university

Develop a dynamic website Open University

  Sample website project

This website consists of three sections: a narrative, a storyboard, and a business Website.

  Online banking application

Designing and developing a web applications The company you are working has secured a contract with a local banking group to develop an ONLINE BANKING APPLICATION using PHP and MySQL.

  Design a dynamic database

Design a dynamic database using Mangodb, html , and php.

  Show the accessibility and usability of website

The webpage must have several menus about country Azerbaijan such as "About Azerbaijan" "History" "Geography" "Landscape" and "Accessibility" menu.

  Implement a web application

Implement a web application called CS320Starter, which is similar to the crowd funding platform Kickstarter where people raise funds for their projects.

  Prepare an ajax enabled web form

Prepare an AJAX enabled web form utilising a ListView control that will allow logged-in staff to list, edit, delete, insert magazine details for magazines from a selected magazine category.

  Create a very simple order system as a web application

Create a very simple Order System as a web application.

  Which of the following jsp expressions is valid

A JSP expression can contain any Java expression that evaluates to a String object, Java object, primitive type, primitive type or Java object

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd