XML - Element Content

Card Puncher Data Processing


The text between a start-tag and a end-tag is called the element's content.

See also: HTML - (Content of an element|Content Model)



An element with no content is said to be empty. The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag.

Examples of empty elements:

<IMG align="left" src="http://www.w3.org/Icons/WWW/w3c_home" />

Mixed (PCDATA)

An element has mixed content when elements of that type contain:

See XML - Parsed Character Data (PCDATA)

Text and elements can be freely intermixed in a DOM hierarchy. That kind of structure is called mixed content in the DOM model.

Mixed content occurs frequently in documents. For example, suppose you wanted to represent this structure:

<sentence>This is an <bold>important</bold> idea.</sentence>

The hierarchy of DOM nodes would look something like this, where each line represents one node:

ELEMENT: sentence
   + TEXT: This is an
   + ELEMENT: bold
     + TEXT: important
   + TEXT: idea.

It is the intermixing of text and elements that defines the mixed-content model.

Not Mixed (CDATA)

An element has a not mixed content when elements of that type contain only character data.

See XML - Character data (CDATA) - Escape


An element type has “element content” when elements of that type MUST contain only child elements (no character data), optionally separated by white space.

Discover More
CSS - Block And Inline Layout (Block Formatting context)

CSS - Block And Inline Layout (Block Formatting context) CSS Block and inline layout is the first layout model of CSS. It's also known as: * block formatting * flow layout The component are laid...
DOM - Element content

Content is a type of node that represents a XML content element (and therefore also a HTML content element if the document type is HTML) ie API With the WebAPI DOM, the Element.innerHTML property...
Jaxpintro Domapi
Java XML - DOM Jaxp

The DOM API of the JSE (ie Jaxp) in Java to process an XML file. To see other DOM implementation, see org.w3c.dom: Defines the Document class (a DOM) as well as classes for all the components...
Card Puncher Data Processing
XML - (Structured) Document

Documents are built from node (elements and text node between node element). These elements form a tree using the DOM. Each XML documents begin with an XML declaration which specifies the version of...
Card Puncher Data Processing
XML - (XML Schema Definition|XSD) (Schema With Capital S)

The in XML. XML Schema definition language (Xsd) is a language that define an XML schema (usually written in the W3C XML Schema Language). It provides functionality...
Card Puncher Data Processing
XML - Element

Each XML document contains one or more elements, the boundaries of which are either delimited by: start-tags and end-tags, or, for empty elements, by an empty-element tag. The element structure...
Card Puncher Data Processing
XML - schema (without capital S)

A schema contains a set of rules that constrains the structure and content of an xml document, i.e., its elements, attributes, and text. A schema is, in other words, a specification of the syntax and...

Share this page:
Follow us:
Task Runner