XML exam question for all you guru's

admin

Administrator
Staff member
Hi

A friend has passed this to me to see if i could help. My knowledge of xml/java is limited but can anyone help?

1. Write an XML document that marks up the following data:

Name Job Department Cubicle
Joe Programmer Engineering 5E
Erin Designer Marketing 9M
Melissa Designer Human Resources 8H
Craig Administrator Engineering 4E
Danielle Programmer Engineering 12E
Frank Salesperson Marketing 17M
Corinne Programmer Technical Support 19T

Easy. Done that.



<?xml version="1.0" encoding="ISO-8859-1" ?>
- <personel>
- <person_detail id="1">
<name>Joe</name>
<job>Programmer</job>
<department>Engineering</department>
<cubicle>5E</cubicle>
</person_detail>
- <person_detail id="2">
<name>Erin</name>
<job>Designer</job>
<department>Marketing</department>
<cubicle>9M</cubicle>
</person_detail>
- <person_detail id="3">
<name>Melissa</name>
<job>Designer</job>
<department>Human Resources</department>
<cubicle>8H</cubicle>
</person_detail>
- <person_detail id="4">
<name>Craig</name>
<job>Administrator</job>
<department>Engineering</department>
<cubicle>4E</cubicle>
</person_detail>
- <person_detail id="5">
<name>Danielle</name>
<job>Programmer</job>
<department>Engineering</department>
<cubicle>12E</cubicle>
</person_detail>
- <person_detail id="6">
<name>Frank</name>
<job>Salesperson</job>
<department>Marketing</department>
<cubicle>17M</cubicle>
</person_detail>
- <person_detail id="7">
<name>Corinne</name>
<job>Programmer</job>
<department>Technical Support</department>
<cubicle>19T</cubicle>
</person_detail>
</personel>



2.Modify the XML document of 1 to qualify each person with a namespace prefix corresponding to their job. Need help on this one.

and lastly:

3. Write Javascript code that uses DOM1 to replace every job description that matches
?Programmer? with ?Developer?.


Any help REALLY appreciated dudes. Many thanks for your time.

Chris
 
Back
Top