Home Xml DTD-Entities



DTD-Entities
Posted on: May 25, 2007 at 12:00 AM
In this section, you will learn about DTD-Entities with syntax and example.

DTD-Entities

     

Entities are variables used to define shortcuts to standard text or special characters. Entity references are references to entities Entities can be declared internally or externally.

Internal Entity Declaration

Syntax

<!ENTITY entity-name "entity-value">

DTD Example:

<!ENTITY name "Amit">
<!ENTITY company "RoseIndia">

XML example:

<Profile>&name;&company;</Profile>

Note: An entity has three parts: an ampersand (&), an entity name, and a semicolon (;).

An External Entity Declaration

Syntax

<!ENTITY entity-name SYSTEM "URI/URL">

DTD Example:

<!ENTITY name SYSTEM "http://www.roseindia.net/entities.dtd">
<!ENTITY company SYSTEM "http://www.roseindia.net/entities.dtd">

XML example:

<Profile>&name;&company;</Profile>

     

Related Tags for DTD-Entities:
ctextvariablesreferencereferencesvariablesedcharentityexternalintriashortcutscharactershortcutcharactersdefinetexiecteentitiestostandardinternalexternrefcishexteitcanvaruseshortpeceinstantcandaclesdeclarespecialspecallinterncuttiereferssprachallandaractrtxtvassrirdrenshostabablfeeclfinndo


More Tutorials from this section

Ask Questions?    Discuss: DTD-Entities  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.