chine installed. And, because XML is also portable, the result is an almost uni- versally portable system and can be used in exactly the same way on any com- puter. To fully understand the concepts discussed in the following paragraphs and chap- ters, you should be familiar with Java, or familiarize yourself with the Java program- ming language using Java tutorials. To understand how these classes do their jobs, you will only need to understand Java classes, objects, interfaces, and methods. There is nothing more complicated than a static method returning an object that implements an interface; if you understand these fundamentals, you will have no problem with any- thing in this book. XML, the Language XML stands for Extensible Markup Language. These three words are actually a very ac- curate description. It is a nonprocedural programming  language, which means that things written in the language are not so much commands as they are descriptions of a condition or state. Like almost all programming languages, XML is written as human- readable text, in such a form that humans as well as programs can read and understand the instructions. The XML language is used to mark up a document so that the reader (usually a pro- gram) can identify each piece of the document and determine its characteristics by ex- amining the tags it contains. A tag can be named anything you would like, but it only has meaning if the program reading the document already knows the tag name. XML is also extensible because you can invent as many markup tags as you need as you go along; all you need to do is make sure the reader of the document knows the meanings of your tags. In fact, there are no markup tags defined as part of XML. The creator of an XML document invents whatever tags are necessary for a full description of the doc- ument being marked up. There is a common misconception that the purpose of XML is to format and display data. That is not what it is for. Its purpose is to store data in a form that can be easily read and analyzed. It is quite common to use XML to store data and use the descriptive XML tags to specify how it should be displayed, but this not an inherent part of XML. It is also very common to write applications that convert XML data into HTML for dis- play. And, because XML and HTML are so similar in their basic syntax, it is possible to use the tag names defined for HTML in an XML document and then use a Web browser to display it as if it were HTML. A special name for this type of XML document is XHTML, but it is just a special case of XML. A file, or other entity, containing XML-formatted data is referred to as a document. This term carries a broad interpretation because XML is used to format many different kinds of information, some of which is never intended for human use (such as data being transferred from one database to another). The following examples show how tags can be used to mark up documents. An XML document can be for any purpose and can take any form it needs to fit that purpose, but generally speaking, there are two categories of XML documents. An XML document can be storage for text that is in- Introduction to XML with JAXP 3 3851 P-01  1/28/02  10:32 AM  Page 3