SAX
SAX
Where we're going
SAX Requirements
Prerequisites
A simple example
Markup and Character Data
Markup and Character Data Example
Entities
Parsed Character Data
CDATA sections
Comments
Processing Instructions
The XML Declaration
Document Type Declaration
Document Type Definition
XML Names
XML Namespaces
Namespace Syntax
Namespace URIs
Binding Prefixes to Namespace URIs
The Default Namespace
How Parsers Handle Namespaces
Canonical XML
Part II: Reading XML Documents with SAX
Parser APIs
SAX
SAX Parsers for Java
What SAX1 doesn't do
SAX2
The SAX2 Process
Making an XMLReader
Parsing a Document with XMLReader
Sample Output from SAX2Checker
The ContentHandler interface
SAX2 Event Reporter
Event Reporter Output
UserLand's RSS based list of Web logs
Goal: Return a list of all the URLs in this list as java.net.URL objects
SAX Design
User Interface Class
ContentHandler Class
Weblogs Output
Features and Properties
Feature/Property SAXExceptions
Required Features
Core Features
Turning on Validation
Three Levels of Errors
The ErrorHandler interface
An ErrorHandler for Reporting Validity Errors
Validating
Schemas
Schema for Songs
Core Properties
Nonstandard Features in Xerces
Nonstandard Properties in Xerces
Properties for Extension Handlers
Handling Attributes in SAX2
Attributes Example
Resolving Entities
EntityResolver Example
Handling DTDs
DTDHandler Example
TextEntityReplacer
Handling Declarations
The DeclHandler interface:
Handling Lexical Events
The LexicalHandler interface
LexicalHandler Example
The Locator interface
Locator Example
The DefaultHandler class
The NamespaceSupport class
Filtering XML
XMLFilter Example
TextMerger
InputSource
The InputSource interface
Example of InputSource
What SAX2 doesn't do
Event Based API Caveats
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2000
Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified November 8, 2000