What's New in XML in Java 5 and 6
Please turn off all
Where We're Going
JAXP, the Java API for XML Processing
JAXP Versions
DOM Level 3
DOM Level 3
DOM Level 3 Core Changes
New methods in the Node interface
User Data
DOMConfiguration
New methods in Text
New methods in Element
New methods in Attr
Questions?
Bootstrapping
DOM3 Bootstrapping
Bootstrapping Example
DOM Error Handler Interfaces
Questions?
Load and Save
Parsing documents with DOM3
The Load and Save Package: org.w3c.dom.ls
DOMImplementationLS
Creating DOMImplementationLS Objects
LSParser
LSInput
LSOutput
LSResourceResolver
LSSerializer
Fibonacci with DOM3
LSParserFilter
LSSerializerFilter
Questions?
XPath
Java XPath API
Using the XPath API
XPath Data Model
Namespaces
NamespaceContext
NamespaceContext Example
XPath query that uses namespaces
XPath Extension Functions
Extension Function that verifies ISBN checksums
Java Validation API
Schema Validation Example
Validate against a document-specified schema
Other schema languages
Schema Augmentation
Reporting Type Information
DOM 3 TypeInfo interface
JAXP TypeInfo provider class
Program to Report All Types
Output
Questions?
Java XML Digital Signatures API
Digital Signatures
Not Just for Signing XML
Generic Digital Signature Process
XML Signature Process
A Detached Signature
Signing a Document: Step 1. Create the Signer Object
Signing a Document: Step 2. Create the Key
Signing a Document: Step 3. Sign the Document
Verifying a Signature
Questions?
StAX
XML API Styles
Pull Parsing
Pull Parsing is
StAX
Major Classes and Interfaces
Simple Wellformedness Checker
Output from a Simple Wellformedness Checker
Event Codes
Listening to Events
Output from EventLister
XMLStreamReader getter methods depend on the current state
getText()
getText() Example
Output
isFoo() and hasFoo()
hasText() Example
More efficient way of getting text
Reusable Text Arrays
Names
QName Class
Names Example
Names Example Output
RSSLister
RSSLister Output
Improved RSSLister
RSSLister Output
The nextTag() method
Attributes
Attributes Example: XLinkSpider
Output from the PullSpider
Namespaces
The NamespaceContext Class
Questions?
XMLStreamWriter
XMLStreamWriter Example: Convert RDDL to XHTML
Example: RDDLStripper
One of my favorite features
Questions?
Future Work
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2007 Elliotte Rusty Harold
Last Modified March 12, 2007