O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Elements in an XML Document

Elements are used to define the structure of an XML document. Elements are the basic unit of markup in XML and are defined by tags. They must form a hierarchy. Elements in turn may contain other elements, character data, processing instructions, or CDATA (character data) sections.

Elements are identified using tags, which contain a tag name within the current namespace. The syntax of tag representation is similar to that of XML, as shown in the document fragment below.

  <book>
    <title>Hello World and Other Stories</title>
    <publisher>Small World Press</publisher>
  </book>
...

XML documents are represented as a hierarchy. This hierarchy is composed of elements and their tags, with a single required root element that represents ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required