What Is XML?

XML has arisen from the need for a portable data format.

Essentially, XML is a standard for representing data in a text document. XML provides a framework for representing almost any kind of data, which is one of the reasons why it has attracted so much interest.

An XML document consists of text-based tags used to provide the document structure (similar to those used in HTML) together with the data itself. All XML documents consist of elements and optional declarations and comments.

Elements

An element has the following form:

<start_tag attributes>body<end_tag>

For example,

<book title="J2EE in 21 Days">A very useful book</book>

In XML, unlike HTML, the tags are not predefined. As the author of an XML document, you are free to ...

Get Sams Teach Yourself J2EE™ in 21 Days 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.