-
Composed of sets of “entities” identified by unique names.
-
Begin with a “root” or document entity.
-
SAMPLE of XML Document.

-
State an XML declaration
-
Mention a root element
-
Then Define the XML code

XML document consists of data and the markup that describes the data.

-
Rules followed while using comments
-
“- -” should not be included within the text of the comment
-
A comment should never be placed within a tag
-
A comment should never be placed inside an entity declaration or before the XML declaration.
-
Comments can be used to comment tag sets
-
Comments cannot be nested

- The text between the start and end tags is defined as “character data”.
-
Character data may be any legal (Unicode) character with the exception of “<“.

-
Storage units of XML.
-
Used within a document to avoid typing long pieces of text repeatedly.
-
Some of the predefined entities representing characters
Type of Entity
-
General Entity
-
Parameter Entity
1. General Entity
Entities that can appear anywhere in an XML document
Example for general Entity
Type of General Entity
-
Internal : Exist in the document where they were declared
-
External : Refer to a storage unit outside the document
<!ENTITY ADDRESS "text that is to be represented by an entity">
2. Parameter Entity
- Parameter entity is used when entities and entity references are required to appear only in the DTD.
-
Parameter entities, either internal or external, are only used within the DTD.
-
It includes “%” specifier.
Example for Parameter Entity
<! ENTITY % ADDRESS "text that is to be represented by an entity">
Pre-defined Entity
Entity name |
Character |
< |
< |
> |
> |
& |
& |
" |
" |
' |
‘ |

-
Valuable both to the Internet and large corporate intranet environments.
-
Provides interoperability using a flexible, open, standards-based format.
-
Applications can be built more quickly.
-
Easier to maintain
-
Can easily provide multiple views of the structured data using different style sheets
-
Examples for the use of XML: Chemical Markup Language [ CML ]
Recent Comments