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
Originally posted by thegown Hi
.............
2.Modify the XML document of 1 to qualify each person with a namespace prefix corresponding to their job. Need help on this one.
..................
Chris
Do you mean you want to add another element in the exisiting document?
Two possible scenarios.
1. Add an additional element in the document and save the file on the disk( Can not be done just using Javascript)you may have to use Java for this.
2. Add and additional element in the memory just to be used at runtime for tempoarary purposes.Yes this you can do with JavaScrupt.
Originally posted by thegown Hi
.............
3. Write Javascript code that uses DOM1 to replace every job description that matches
?Programmer? with ?Developer?.
..................
Chris
This can be done by simply
1. search for the element e.g getElementByName("programmer")
then you can insert another element and delete this one.
Bookmarks