Question 4: ===================== The following is from XML for Java Compatibility API 2.0.15. http://falconet.inria.fr/~java/classes/xml4j/TXapiDocs/ I show you pieces of the documentation and ask you to interpret it based on your knowledge of traversal/visitor programming. Consider the following example of XML4J (XML for Java) code: ---- PrintWriter printWriter = new PrintWriter(); Visitor htmlPrintVisitor = new HTMLPrintVisitor(printWriter); TreeTraversal treeTraversal = new NonRecursivePreorderTreeTraversal(htmlPrintVisitor); treeTraversal.traverse(document); printWriter.close(); ---- Question 4.1: What is your interpretation of the behavior of this code? Give a brief explanation in English. Consider the following documentation of EndTraversalException: public class EndTraversalException extends TreeTraversalException ---- XML4J tree traversal exception which signals from a Visitor to the tree traversal algorithm that all further traversal should be ended because the visit on the document object hierarchy has been successfully completed. For example, this exception could be used by search Visitors that are looking for the first TXElement Node which contains certain state data. ---- Question 4.2: How could EndTraversalException be added to DJ? Give a brief discussion of the interesting issues.