About XML DTD and its various components

The DTD is a building block of an XML document. It defines a list of legal documents for the document structure. A DTD can be specified either externally or internally in a document.

With the help of a DTD each of your XML files can carry information in their own format. A standard DTD can be used to verify whether the data you receive from outside is valid or not. A DTD can be declared either internally or externally. The following are the simple building blocks of XML:

.

* Tags
* Elements
* Entities
* Attributes
* CDDATA
* PCDATA

TAGS:

These are used to markup elements. These are used for formatting codes. This indicates how a document will appear when displayed.
Example:

<Wish>
<To>John</to>
<From>Jill</From>
<Heading>Reminder</Heading>
<Body>HAPPY BIRTHDAY</Body>
</Wish>
In the above example the term “wish” is the tag.

ELEMENTS:

These are the main building blocks of XML documents. Elements can contain text or they can be empty

Example:

<Wish>
<To>John</To>
<From>Jill</From>
<Heading>Reminder</Heading>
<Body>HAPPY BIRTHDAY</Body>
</Wish>

In the above example the terms <to>, <from>, <body> are the elements.

ENTITIES:

They are variables to define common text.

A few of the predefined entities in XML are as follows:

Entity References
Character
&gt;
>
&lt;
<
&quot;
&amp;
&
&apos;
'

ATTRIBUTES:

They provide extra information about elements.
Example:

<Img src="computer.gif" />

In the above example the Img provides more information about the image by specifying source of the image using the attribute “src”.

CDATA:

Cdata means Character Data. It is a text that will not be parsed by the parser. The text inside these tags is not treated as markups and the entities will not be expanded.

PCDATA:

PcData denotes “Parsed Character Data”. PcData is the text parsed by the parser. The text inside these tags is treated as markups and the entities will be expanded.



SetApp - 100 Apps for everything you ever wanted to do on Mac

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________





Top XML News





Resource List


| xml dtd | dtd in xml | dtd from xml | xml dtd example | xml to dtd |dtd to xml schema | xml dtd examples | xml schema vs dtd | dtd xml tutorial | xml dtd reference | java xml dtd | xml dtd generator | docbook xml dtd | xml dtd specification | dtd and xml schema | generate xml from dtd | xml dtd sample | build xml dtd | xml dtd xsl | sample xml dtd | xml dtd entity | xml dtd implied | xml dtd validate | dtd schema xml | xml dtd files | what is xml dtd | xml validator dtd | xml doctype dtd | xml dtd help | xml dtd tool |generating dtd from xml |xml to dtd conversion | what is dtd xml | writing an xml dtd | dtd xml examples |

FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!

Visit XML Training Material Guide Homepage

 

 

“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”

Copyright - © 2004 - 2019 - All Rights Reserved.