Arrow Home
Arrow Registration
Arrow Hotel/Travel
Arrow Tutorials
Arrow Sessions
Arrow Download Presentations
Arrow Speakers
Arrow BOFs
Arrow Press
Arrow Mail List
Arrow Exhibitors
Arrow Sponsors
Arrow Brochure (PDF)
Arrow Interactive Scheduler
  Create Wed
  Create Thurs
  View Schedule


Globe

Register Now!

O'Reilly Conference on Enterprise Java
Westin Hotel -- Santa Clara, California
March 26-29, 2001

Tutorial

Processing XML with Java

Elliotte Rusty Harold, Adjunct Professor, Polytechnic University

Track: Java Tutorials
Date: Monday, March 26
Time: 1:30pm - 5:00pm
Location: Ballroom D

XML is a flexible meta-language that allows you to design markup languages to fit your documents rather than the one-size-fits-all approach of HTML. XML is suitable not only for Web pages, but also for application file formats, object serialization, and data interchange between applications. This tutorial will show you how to use Java to process XML documents and show you why you might want to do that.

XML files are text files so you'll explore how Java outputs text using Writers and how to use these classes to write XML. Then you'll see some demonstrations of the conversion of existing data formats to XML. Of course writing data is only half of the I/O equation so next you'll learn how to read XML documents from Java. Input is considerably more complicated than output. Fortunately 90% of the work can be done for you by free parsers like the Apache Project's Xerces. You'll see how to use the standard, event based Simple API for XML (SAX) to drive your own programs through callbacks.

Most parsers also support a more object oriented view of an XML document by implementing the W3C's Document Object Model (DOM). You'll investigate the DOM in depth, see how it compares to SAX, and learn which API is appropriate for which tasks.

Outline:

  • Text I/O in Java
  • Writing XML with Java
  • Reading XML with SAX2
  • Reading XML with DOM2

Prerequisites:
Students should be completely comfortable programming in Java, should have at least a user's understanding of the Internet, and should be familiar with XML Basics.


O'Reilly Home | Conferences Home | O'Reilly Conference on Java
Registration | Hotels/Travel | Tutorials | Sessions | Download Presentations
Speakers | Press | Mail List | Exhibitors | Sponsors

© 2001, O'Reilly Media, Inc.
conftech@oreilly.com