You are on page 1of 2

Assignment No.

Total Marks: 20
Semester: Fall 2017
Introduction to Web Services Development CS311 Due Date: 24/11/2017

Understand and get hands on experience of
PHP server side script
Nested loops in PHP
Reading XML elements in PHP
Display XML element into HTML table
Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:

The assignment is submitted after due date.

The assignment is submitted via email.
The assignment is copied from Internet or from any other student.
The submitted assignment does not open or file is corrupt.
It is in some format other than .php(PHP Code File).

Note: All types of plagiarism are strictly prohibited.

For any query about the assignment, contact at

Problem Statement
Well-formed code of XML is given below which is showing picture book list in XML format. You
are required to write PHP code which will read given XML code and display in HTML table as
showing in screen shot of sample output.

<?xml version='1.0' encoding='UTF-8'?>

<title>Where The Wild Things Are</title>
<illustrator>Maurice Sendak</illustrator>
<price>$ 120</price>
<title>Dorrie And The Blue Witch</title>
<illustrator>Patricia Coombs</illustrator>
<price>$ 80</price>
<title>Foot Book</title>
<illustrator>Theodor Geisel</illustrator>
<price>$ 75</price>
<title>Eye Book</title>
<illustrator>Roy Mckie</illustrator>
<price>$ 125</price>
<title>Hop On Pop</title>
<illustrator>Theodor Geisel</illustrator>
<price>$ 100</price>


Sample Output:

Assignment Uploading Instructions:

You need to upload PHP file that contain solution of this assignment. The procedure to use online tool
to write, compile, test PHP code and export as PHP file is given in demo.mp4 video file.

Tips: Create a string of whole XML code and use built-in PHP function simplexml_load_string( ) to
get object. Convert object into array and display information in array in HTML table.

Please note that due date of assignment will not extend, so do not wait for last date and submit your
solution as quickly as possible.