XML - Element

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>

Property

Each element has:

  • name (full or local)
  • a type,
  • may have a set of attribute specifications,
  • and a content

Name

Full Name

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

Example:

<namespace:local-name>

Local Name

Its name without any namespace

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>

You can define the schema between element type via element type declaration

Attribute

Content

Empty

Usage: Inline vs Structure


Powered by ComboStrap