What is Entities in XML

In this article you will learn what is Entities in XML.
  • 1796

DTD Entities

Entities are special keyword that has special meaning in XML. Or we can say it is variable used to define shortcut  of the special text and character also. Entities can be declared both internal and external.

Syntax Of Internal Entities declaration

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

Example Of Internal Entities declaration

<!ENTITY name "satya">
<!ENTITY company "MCN private solution">

 

One most important think

Entities has the three part (i) & (ii) entities name (iii) ";"

 

for Example:

 

&lt; <
&gt; >

An External Entity Declaration

Syntax of External entities

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

Example:

<!ENTITY name SYSTEM "http://www.ducatindia.com/entities.dtd">
<!ENTITY company SYSTEM "http://www.ducatindia.com/entities.dtd">

 

further Readings

You may also want to read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers her

 

© 2020 DotNetHeaven. All rights reserved.