You are on page 1of 8

ITAP3012

Developing Web Applications


Tutorial – 10

Prabhjot Singh Grewal- 47294


Activity 1
Create a XML file with the <Article> as a root tag. Each article contains the Headline, Author,
Para and each para there is an instrument. Fill all the details and save the file as .xml. Open in
the browser and take the screenshot and save.

Activity 2
Create a “common.css” file and add styles to your XML file created in Activity 1. You need to
add the following styles
1. The display property for INSTRUMENT is inline and for all other it should be block
2. The font-family for ARTICLE should be serif
3. The text of PARA should be indented 1em.
4. The font style of the INSTRUMENT should be italic.
Activity 3
We have created an art.xml file that contain the paintings record and test.html file that
Html/JavaScript code to get the “ID” and “Title” of each painting. Read the code and write
the comments for each JavaScript line. You can use online resources.
Activity 4
Consider the following code that is used to read data from the “art.xml” file discussed in
Activity 3. Please read the code and modify it to a show each painting title, author name, and
year.
Activity 5
Consider you have been given the following JSON string.
'{"artist": {"name":"Manet","nationality":"France"}}';
1. Write the PHP code to get the name and nationality of the artist?
2. Write the JavaScript code to get the name and nationality of the artist?

Activity 6
Create a simple REST API in PHP using the instructions given below. You need to complete
this activity and share the screenshots with brief explanation of your final product in the
Tutorial 10 report file.

You might also like