You will have to change the imports from javax.swing to com.sun.java.swing before recompiling though. Thanks to the DOM which takes care of the XML drudgery for us, ViewXML is remarkably small and simple. Most of these methods simply updates the on-screen tree. We ignore the DocumentType, Entity and Notation interfaces because they implement support for DTDs. At the time of this writing, support for DTDs in DOM is very limited.
Work is still under way.
Don't get confused here. Validating parsers will enforce the DTD, but they can only return limited information about the DTD to your application. The IBM parser generates events when there's a syntax error in the document. By default the errors are printed on the console but, in ViewXML, an ErrorListener traps the events and adds them to a list. Parsers enable Java programmers to easily XML-enable their applications.