1
This chapter is an overview of some of the basic things you will need to know before
you can understand the processing of XML documents using Javas Java API for XML
Processing (JAXP). Although the Java application programming interface (API) is rather
straightforward, you will need to understand how XML is constructed before you can
clearly understand the sort of things that can be done with the API. The fundamental
concepts described in this chapter include the fact that, like HTML, the XML language
is derived from SGML. This kinship between XML and HTML has brought about the ex-
istence of a hybrid known as XHTML. There are two completely distinct parsers, named
DOM and SAX, that can be used to read the contents of an XML document.
Java and XML
Java was designed to make it possible to write completely portable programs. XML
was designed to make it possible to create completely portable data. In an ideal situa-
tion, using the two together will make for a completely portable software package that
can communicate its data with any other completely portable software package. Noth-
ing is absolutely perfect, but these two, used together, come about as close as anything
that has been developed so far in terms of the ability to write a program that runs on
any type of computer and can swap data with any other type of computer.
Introduction to
XML with JAXP
C H A P T E R
1
3851 P-01 1/28/02 10:32 AM Page 1