Create an xml document to record the maximum temperature

Assignment Help Computer Engineering
Reference no: EM131550620

WAD LABORATORY

Objectives covered in this laboratory

- Practise to use XMLHttpRequest

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

Exercises

NOTE: Questions (a) to (c) are required exercises for all students, while Question (d) is an additional exercise.

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

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

2321_Figure1.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. For detailed requirements, please run https://mercury.swin.edu.au/cos30020/cliu/Lab6/simpleajax2.htm or ask the tutor in the lab.

1745_Figure2.jpg

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

Reference no: EM131550620

Questions Cloud

Threats to internal and external validity : What might have affected those results (i.e., threats to internal and external validity). Include flaws in your design and confounding variables.
Do the costs of globalization outweigh its benefits : What do you think? Do the costs of globalization outweigh its benefits? Write an essay in which you argue for or against globalization.
What is the net investment outlay : a. What is the Net Investment outlay? b. What are the cash flows over the life of equipment?
Discuss the ratio of the two device standard deviations : Suppose the two sets of five measurements referred to in problems 1 and 2 actually came from one pellet, i.e., operator 1 measured the same pellet five times.
Create an xml document to record the maximum temperature : WAD LABORATORY - Practise to use XMLHttpRequest - Practise to use DOM to search and change an XML document - Design and create an XML document to record
Calculate waccs based on book : The tax rate is 40%. Calculate WACCs based on book, market, and target capital structures.
What are the authors possible prejudices or biases : Information about the author, either from the book or an outside source. What are the author's possible prejudices or biases?
Evaluate the social construction of stereotypes : Analyze individual differences, the wide range of cultures, and other dimensions of diversity.
Why did you find any of the reasons or causes surprising : Did you find any of these reasons or causes surprising? Why or why not? Sheep and goats have several similarities, but are also different in many ways.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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