Example Source Code from Chapter 6, SAX, of Processing XML with Java
Example 6-1 A SAX program that parses a document
Example 6-2 The SAX ContentHandler interface
Example 6-3 A SAX ContentHandler that writes all #PCDATA onto a java.io.Writer
Example 6-4 The driver method for the text extractor program
Example 6-5 A subclass of DefaultHandler that writes all #PCDATA onto a java.io.Writer
Example 6-6 A ContentHandler interface that resets its data structures between documents
Example 6-7 A ContentHandler class that builds a GUI representation of an XML document
Example 6-8 The SAX Attributes interface
Example 6-9 A ContentHandler class that spiders XLinks
Example 6-10 A SAX client for the Fibonacci XML-RPC server
Example 6-11 A ContentHandler that prints processing instruction targets and data on System.out
Example 6-12 The NamespaceSupport class
Example 6-13 A document that uses ignorable white space to prettify the XML
Example 6-14 An XML document containing a potentially skipped entity reference
Example 6-15 The SAX Locator interface
Example 6-16 Determining the locations of events
Examples from Other Chapters
|
Processing XML with Java
|
Cafe con Leche
Copyright 2002 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified November 23, 2002