[SOLVED] Web_Technology - Week 7 Exercise

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

Introduction to Web Technology

 

Lab Programming 

 

 

Question 1. This is the content of an XML file q1-error.xml​

 

<?xml version=”1.0″ encoding=”UTF-8″?>

<student sn=3719301>

<firstName>John</firstName>

<lastName>Smith</lastName>

<email>[email protected]</email>

</student>

 

<student sn=6382520>

<firstName>Mary</firstName>

<lastName>Jane</lastName>

<email>[email protected]</email>

</student>

 

The above XML file contains several errors.

Your task is to identify these errors and correct them.

Save your correct XML code into a new file called q1-correct.xml.

 

Question 2. Have a look at the following XML sample code. Your task is to create an XML file called q2.xml and write XML code to include 5 staff records.

<?xml version=”1.0″ ?>

<dailyUpdate campus=”Woolloomooloo” date=”24/02/2016″>

<staff operation=”update”>

<staffNumber>0154728</staffNumber>

<firstName>John</firstName>

<lastName>Smith</lastName>

</staff>

 

<staff operation=”add”>

<staffNumber>5287523</staffNumber>

<firstName>Mary</firstName>

<lastName>Jane</lastName>

</staff>

</dailyUpdate>

Page 1 of 2

 

Question 3. Write an XML document called q3.xml that represents the following student record:​

 

 

 

 

Question 4. Copy the code from q3.xml to q4.xml.​   In q4.xml, write the corresponding internal DTD.

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.