![]() | MSc-IT Study Material June 2010 Edition Computer Science Department, University of Cape Town |
Relational data, such as the set below, can be encoded into XML format as follows:
class | CS&614 | ||||||
students | 3 | ||||||
marks |
|
This data could be encoded as shown below, although there are many other ways of doing this. Can you rewrite it differently?
<class>CS&614</class> <students>3</students> <mark> <student_name>vusi</studentname> <mark_obtained>12</mark_obtained> </mark> <mark> <student_name>john</student_name> <mark_obtained>24</mark_obtained> </mark> <mark> <student_name>nithia</student_name> <mark_obtained>36</mark_obtained> </mark>
Now encode the following in XML:
Name | Age | Occupation |
---|---|---|
Tsepo | 20 | Student |
James | 19 | Waiter |
Molly | 27 | Executive |