XML - Element

> Markup Language (ML) > Extensible Markup Language (XML)

1 - About

Each XML document contains one or more elements, the boundaries of which are either delimited by:

<myElementName></myElementName>
<empty/> <!-- Empty Element -->

The element structure of an XML document may, for validation purposes, be constrained using declarations.

element = <start tag> + content + <end tag>

Advertising

3 - Full Name

The full name of an element consists of its 'local' name, and its namespace URI.

4 - Syntax

Each element has:

  • a type,
  • may have a set of attribute specifications,
  • and a content

4.1 - Type

The Name in the start- and end-tags gives the element's type. It's sometimes called its “generic identifier” (GI).

<type></type>
<name></name>
<id></id>
<gi></gi>

4.2 - Attribute

4.3 - Content

4.4 - Empty

5 - Type

Advertising