Starting from:

$30

CSIT128-Lab 7 Solved

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

 

<?xml version="1.0" encoding="UTF-8"?

 <student sn=3719301

   <firstNameJohn</firstName

   <lastNameSmith</lastName

   <emailjsmith@gmail.com</email

 </student

 

 <student sn=6382520

   <firstNameMary</firstName

   <lastNameJane</lastName

   <emailmjane@gmail.com</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"

   <staffNumber0154728</staffNumber

   <firstNameJohn</firstName

   <lastNameSmith</lastName

 </staff

 

 <staff operation="add"

   <staffNumber5287523</staffNumber

   <firstNameMary</firstName

   <lastNameJane</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.

More products