intro
P8Y10M4D
XML APIs
XML is still painful
What about data binding?
Schema
What if schema doesn't exist?
ad hoc
XML block
Writing ad hoc XML still painful
Where is the pain?
CONSTRUCTION
Example - XML doc - 1
Example - XML doc - 2
Example - addReviewer
Example - W3C DOM
Example - JDOM
Example - XML doc - 3
Example - W3C DOM
Example - W3C DOM
DOM
Example - JDOM
CONVERSION
Example - addReviewer
Example - Timestamp - 1
Example - Timestamp - 2
Example - XML data - 1
Example - XML data - 2
Example - Timestamp - 3
Example - Timestamp - 4
Example - Timestamp - 5
NAVIGATION
Example - XML doc 1
Example - XML doc 2
Example - Features.java
Example - Features.java
Example - SurpressWarnings
Example - rejectOpenFeatures 1
Example - rejectOpenFeatures 2
Example - XPath
Example - JDomException
STREAMING
Example - XML doc 1
Example - Mustang
Example - StaX
Example - HTML
Example - StaX
Where is the pain?
What about dom4j, or XOM?
Let's compare...
Writing ad-hoc...
Lets brain storm
New primitive type?
java.lang.String
"foo"
java.lang.XML
<foo/>
java.xml.*
New...
java.lang.XML
Example - Feature list
Example - JDom - 1
Example - java.lang.XML - 1
Example - JDOM - 2
Example - java.lang.XML - 2
Example - newFeature(...) - 1
Example - addReviewer(...) - 1
Datatype Coders
Example - addReviewer(...) - 2
Example - addReviewer(...) - 3
Example - DataCoder
Example - addReviewer(...) - 4
Example - getReviewTime(...)
Navigation
Example - Feature list
Example - rejectOpenFeatures - 1
Example - rejectOpenFeatures - 2
Example - rejectOpenFeatures - 3
Streaming
Example - Feature list
Example - StaX
Example - summarize(...) - 1
Example - summarize(...) - 1
Example - XMLSource
Example - summarize(...) - 2
Example - HTML
Example - summarize(...) - 3
Example - summarizeToXHTML(...) - 1
Example - XMLSink
Example - summarizeToXHTML(...) - 2
Example - StaX
Example - summarizeToXHTML(...) - 3
java.lang.XML - 1
java.lang.XML - 2
Coming soon ?
Writing ad-hoc...
Two Questions for you - 1
Two Questions for you - 2
Q&A
It has often been said that XML and the Java platform are natural complements of each other, yet for many kinds of applications the marriage between these two technologies has proved to be less than completely harmonious. This talk will review the existing means of manipulating XML in Java applications and explore a new approach based upon integrating the syntax of XML documents directly into that of the Java programming language.
Mark Reinhold is the Chief Engineer for the Java 2 Platform, Standard Edition, at Sun Microsystems. His past contributions to the platform include character-stream readers and writers, reference objects, shutdown hooks, and the NIO high-performance I/O APIs. He has been deeply involved in the development of the platform since the 1.1 release.