You are asked to create an HTML document that uses DOM and JavaScript to display the contents of the above XML document in the browser. You may use the firstChild/nextSibling methods, getElementsByTagName method, an iteration method, or even a recursive method. However, as a catch, you should know the ontology of your document and prefix the content you display with descriptive prefixes related to data content. For example: Enterprise data exchange should be prefixed by Title.
You are not required to write a working JavaScript program. If you are not familiar with JavaScript, you can write a pseudo code or an essay to explain how it works instead.
Hint for JavaScript program, you can follow the JavaScript example in chapter 11 - The XML Document Object Model: The Node Object - The Effect of Text Nodes. Your code should be only one HTML document and be turned in as an attachment. You should test your code in your browser before submitting the assignment.
Now write a java program that uses SAX parser to print the contents of the above XML document. The java program you write should use the SAX event handling functions. As an output, you should see the ontology of your document and descriptive prefixes related to corresponding data content.
You are not required to write a working java program. If you are not familar with Java, you can write a pseudo code or an essay to explain how it works instead.
Hint for java program, you can follow the Java example "TrainReader" in chapter 12 - Simple API for XML (SAX). Your code should be in only one java file, and only this java file will be turned in as an attachment. You should test your code before submitting the assignment.