matthew61773
08-30-2006, 07:06 PM
Hi, I have been set this XML coding question at college and am having trouble with it. Can anyone help please?
The University of Glamorgan is made up of staff and students. Each member of staff has a "name", a "job" post, an "e-mail" address and a "room" number. Each student has a "name" , a student "number" and a "course". Produce an appropriate XML encoding using the DTD and sample data set provided below.
Sample Data:
Dr J Evans (staff). Senior Lecturer, jevans@glam.ac.uk, j124
M P Jones (student), 08082312, Business Studies
Mr K Lewis (student), 08357621, software Engineering
Prof G Davies (staff), Professor IS Security, gdavies@glam.ac.uk, g342
DTD:
<!DOCTYPE glamorgan[
<!ELEMENT glamorgan (staff|student)*>
<!ELEMENT staff (name,job,email,room)>
<!ELEMENT student(name,number,course)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT job (#PCDATA)>
<! ELEMENT email (#PCDATA)>
<! ELEMENT room (#PCDATA)>
<! ELEMENT number (#PCDATA)>
<! ELEMENT course (#PCDATA)>
]>
thanks matthew61773
The University of Glamorgan is made up of staff and students. Each member of staff has a "name", a "job" post, an "e-mail" address and a "room" number. Each student has a "name" , a student "number" and a "course". Produce an appropriate XML encoding using the DTD and sample data set provided below.
Sample Data:
Dr J Evans (staff). Senior Lecturer, jevans@glam.ac.uk, j124
M P Jones (student), 08082312, Business Studies
Mr K Lewis (student), 08357621, software Engineering
Prof G Davies (staff), Professor IS Security, gdavies@glam.ac.uk, g342
DTD:
<!DOCTYPE glamorgan[
<!ELEMENT glamorgan (staff|student)*>
<!ELEMENT staff (name,job,email,room)>
<!ELEMENT student(name,number,course)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT job (#PCDATA)>
<! ELEMENT email (#PCDATA)>
<! ELEMENT room (#PCDATA)>
<! ELEMENT number (#PCDATA)>
<! ELEMENT course (#PCDATA)>
]>
thanks matthew61773