|
|
Resource Guide -> XML and Java Tutorials, SAX vs. DOM, IBM -> XML programming in Java
XML programming in Java
Date: May. 22, 2001 Before demonstrating how to use a parser, Tidwell discusses why you would want to use a parser, describing different kinds of parsers, including validating versus non-validating parsers, Simple Application Programming Interface for XML (SAX) versus Document Object Model (DOM) parsers and the pros and cons of parsers written in particular programming languages. The student downloads a sample XML application (marking up Shakespeare's Sonnet 130), and then repeats the instructor's Java coding steps to perform several typical DOM functions. The process is then repeated for SAX. Now that the student has some hands on experience with both SAX and DOM, the features of each are contrasted in more detail. The tutorial ends with more advanced parser usage: building a DOM tree from scratch, using DOM methods to manipulate the tree, and an exercise that illustrates how standard interfaces like SAX and DOM make it easier to switch between parsers. XML4J is required to follow the tutorial examples. A brief registration is required to enter the tutorial. |
|
|
|
|
|
|