LAB 2 : XML
Question 1
Haneena and Co. has a
telephone directory that records the first and last name, telephone number and
email address of everyone working in the company. Departments are the main
organizing unit of the company so the telephone directory is typically displayed
in department order and shows for each department the contact phone and fax
number and email address.
Create an XML file
containing some directory data.
Answer Question 1
Figure 1.0 – XML File for Haneena and Co.
--------------------------------------------------------------------------------------------------------------------------------------------------
Question 2
Give
an XML-document (by not using attributes), which includes the information that
the first name of a person is Adi, his last name is Maulud, and his professions
are doctor, therapist and surgeon.
Answer
Question 2a
Figure 2.0 – XML Document
--------------------------------------------------------------------------------------------------------------------------------------------------
Give
the tree diagram of the document given in 2a.
Answer
Question 2b
Figure 2.1 – XML Document and Tree Diagram
--------------------------------------------------------------------------------------------------------------------------------------------------
Modify
the document given in 2a such that the “first” and “last” are the attributes of
the name element
Answer
Question 2c
Figure 2.2 – Modified XML Document (Attributes)
--------------------------------------------------------------------------------------------------------------------------------------------------
Question 3
Give
an XML-document (by not using attributes), which includes the following
information: the social security number (123456789A), the first name of a
person is Adha, and his last name is Hadif, his address is composed of postcode
(86400), city (Batu Pahat) and street (Jalan Puding), and his telephone numbers
are 12345 and 67890.
Answer
Question 3a
Figure 3.0 – XML Document (No
Attributes)
--------------------------------------------------------------------------------------------------------------------------------------------------
Give
the tree diagram of the document given in exercise 3a.
Answer
Question 3b
Figure 3.1– XML Document and Tree Diagram
--------------------------------------------------------------------------------------------------------------------------------------------------
Give a DTD (Document Type
Definition) for the XML-document specified in 3a.
Answer
Question 3c
Figure 3.2 – DTD (Document Type Definition) for
the XML-document
--------------------------------------------------------------------------------------------------------------------------------------------------
Give
an XML Schema for the information specified in exercise 3a.
Answer Question 3d
Figure 3.3
– XML Schema
--------------------------------------------------------------------------------------------------------------------------------------------------
END LAB 2
LAB 2 : XML
Question 1
Haneena and Co. has a
telephone directory that records the first and last name, telephone number and
email address of everyone working in the company. Departments are the main
organizing unit of the company so the telephone directory is typically displayed
in department order and shows for each department the contact phone and fax
number and email address.
Create an XML file
containing some directory data.
Answer Question 1
Figure 1.0 – XML File for Haneena and Co.
--------------------------------------------------------------------------------------------------------------------------------------------------
Question 2
Give
an XML-document (by not using attributes), which includes the information that
the first name of a person is Adi, his last name is Maulud, and his professions
are doctor, therapist and surgeon.
Answer Question 2a
Figure 2.0 – XML Document
--------------------------------------------------------------------------------------------------------------------------------------------------
Give
the tree diagram of the document given in 2a.
Answer Question 2b
Figure 2.1 – XML Document and Tree Diagram
--------------------------------------------------------------------------------------------------------------------------------------------------
Modify
the document given in 2a such that the “first” and “last” are the attributes of
the name element
Answer Question 2c
Figure 2.2 – Modified XML Document (Attributes)
--------------------------------------------------------------------------------------------------------------------------------------------------
Question 3
Give
an XML-document (by not using attributes), which includes the following
information: the social security number (123456789A), the first name of a
person is Adha, and his last name is Hadif, his address is composed of postcode
(86400), city (Batu Pahat) and street (Jalan Puding), and his telephone numbers
are 12345 and 67890.
Answer Question 3a
Figure 3.0 – XML Document (No
Attributes)
--------------------------------------------------------------------------------------------------------------------------------------------------
Give
the tree diagram of the document given in exercise 3a.
Answer Question 3b
Figure 3.1– XML Document and Tree Diagram
--------------------------------------------------------------------------------------------------------------------------------------------------
Give a DTD (Document Type
Definition) for the XML-document specified in 3a.
Answer Question 3c
Figure 3.2 – DTD (Document Type Definition) for
the XML-document
--------------------------------------------------------------------------------------------------------------------------------------------------
Give
an XML Schema for the information specified in exercise 3a.
Answer Question 3d
Figure 3.3
– XML Schema
--------------------------------------------------------------------------------------------------------------------------------------------------








No comments:
Post a Comment