22.11. Summary

In this chapter I have discussed the fundamental characteristics of XML and how Java supports the analysis and synthesis of XML documents. The key points I've covered include the following:

  • XML is a language for describing data that is to be communicated from one computer to another. Data is described in the form of text that contains the data plus markup that defines the structure of the data.

  • XML is also a meta-language because you can use XML to create new languages for defining and structuring data.

  • Markup consists of XML elements that may also include attributes, where an attribute is a name-value pair.

  • The structure and meaning of a particular type of document can be defined within a Document Type Definition (DTD).

  • A DTD can be defined in an external file or it can be part of a document.

  • A DTD is identified by a DOCTYPE declaration in a document.

  • The Schema Definition language provides a more flexible alternative to DTDs.

  • An XML namespace defines a set of names qualified by a prefix that corresponds to a URI.

  • The SAX API defines a simple event-driven mechanism for analyzing XML documents.

  • A SAX parser is a program that parses an XML document and identifies each element in a document by calling a particular method in your program. The methods that are called are those defined by the SAX API.

Get Ivor Horton's Beginning Java™ 2, JDK™ 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.