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

  Build a simple ecommerce site

300582 - Technologies for Web - Your assignment is to build a simple eCommerce site. The products available for this site is up to you. There is no facility for product images, so your products will have a name and description only.

  Examine the arguments for and against this approach

Some Web sites state that their pages are best viewed in a particular browser or browser version or that they do not support certain browser versions. Examine the arguments for and against this approach.

  What problems in viewing html files without a web server

What are the problems in viewing HTML files without a web server

  Create a simple web application that collects gradings

create a simple web application that collects gradings under a number of criteria and then evaluates an aggregate mark.

  Create dynamic drop-down menu in php

Create dynamic drop-down menu in PHP. For example, let's say that there is a drop-down menu with list of car manufacturers; Toyota, Ford, and Chevy.

  Create a html page

Create a HTML page where a user can select a state from a list of all 50 states. When the user select the state, the web page must make an Ajax call to fetch the capital of the state and display it in another text box.

  Create an online order form using html

Create an online order form using HTML and process it using PHP for the university bookstore

  List the item ids and their location description

In this assignment youare required to use PHP program to connect to the XAMPP web server. You will then create a database which will include tables with records.

  Encryption and hashing

securing a new web server and a new web application, input validation, CSRF attack, SQL injection vulnerability, Cross Site Scripting (XSS) attack, architecture mechanism Linux, Apache, MySQL, and PHP,

  Create an xslt stylesheet that transforms the provided xml

Use the documents that are posted on share out. Many of them demonstrate very similar (or even the same) examples as what you are being ask to do for this assignment.

  Casemr red bought a powerboat from blacks boat sales under

casemr. red bought a powerboat from blacks boat sales under a conditional sale agreement paying 5000 down with the

  Develop an envisioned methodology and design a research

develop an envisioned methodology and design a research topic based on the research problem purpose. then write a

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