Logical Structures

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email
The various logical structures of an XML document are:

*Elements
*Attributes
* Entities.

An element declaration contains the element's name and the type of data the element can contain. The content of an element is known as its content specification. The content specification can be of four different types namely:

1. Empty-No content is allowed.
2. Any-Any type of content is permitted.
3. Element-Only content that consists of other elements is permitted.
4. Mixed-An element can contain both data and element content.

Empty Element Declaration

An element declared with the keyword empty cannot contain any content. The syntax for declaring an element with empty content is:

The document containing the BOOK element cannot have any content. It has to be declared as an empty element, such as . Although an empty element cannot contain any data it can have attributes that provide meaningful content. It can also provide specific functions in a document.

Any Element Declaration

An element declared with the keyword ANY can contain any content allowed by the DTD in any order. The syntax for any element declaration is:

Content Model

The example DTD given above started with the following declaration:

The LIB element contains only sub elements or child elements. Every element given in the content model has a corresponding element declaration in the remaining part of the DTD that follows.

Mixed Content

The content specification can be a single set of alternatives in which the alternatives are separated by commas. The syntax for declaring the mixed content is:

XML allows two types of data namely:

1 . Parsed character data : it contains markup tags.
2. Character data : it contains ordinary text that can include characters reserved for markup.

The following table lists the set of symbols used by XML for specifying the structure of an element declaration.



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.