Physical Structure in XML

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email
The physical structure consists of the contents used in an XML document. It holds the actual data to be represented in an XML document. These actual data storage units can be called as Entities. These entities are identified by a unique name and may be part of the XML document or external to the document. An entity is declared in the XML declaration part and referenced in the document element. Once declared in the DTD, an entity can be used anywhere.
<p align="justify"><b>Parsed Entities</b><p align="justify">
A parsed entity is also known as the text entity. Once the data is processed, the text
data in the parsed entity becomes part of the XML document. A parsed entity is
intended to be read by the XML processor so that its content can be extracted. The
extracted contents then become part of the text content of the XML document where
the reference to the entity is made. The following code illustrates an entity declaration:
<p align="justify">
<?xml' version=," 1.0"?>
<br>
<!DOCTYPE LIB SYSTEM "Iib.dtd"]>
<br>
<!ENTITYtype"paperbound">
<p align="justify">

The above declaration means that an entity named type has been declared whose value is "paperbound". Wherever this entity is referenced in the XML document, it will be replaced with the value "paperbound". The advantage of using an entity is that a change in the value of the entity at one place, the declaration, will be reflected in the entire XML document.<p align="justify">
<b>Entity Referrence</b><p align="justify">
An entity reference acts as a place holder for the content author and the XML processor places the actual content at each reference site. An entity reference can be made by inserting an ampersand(&) symbol followed by the entity name and then a semicolon(;). For example if you want to use the "type" entity the following syntax has to be used:

<BOOKTYPE>The book type is &type; </BOOKTYPE>

When the processor encounters this line & type it will be replaced with its contents. After processing, the line will read "The book is paperbound "

A slight variation of the entity reference is the Parameter Entity Reference. A parameter entity reference is represented by a modulus symbol instead of the ampersand symbol.
<p align="justify"><b>Unparsed Entities</b><br><br>
An unparsed entity is one, which is not directly interpreted by the XML processor. An unparsed entity is also known as a binary entity because its content mostly includes binary files. An unparsed entity can also contain plain text. It requires information about the binary file, which is included in notation. A notation identifies the format or the type of the resource file to which the entity is declared. The following codes illustrate the use of an unparsed entity:
<p align="justify">
<! ENTITY Image SYSTEM " Image1.gif " NDATA GIF>
<p align="justify">
The above declaration means that the binary file is of GIF type. An unparsed entity also requires another declaration namely the Notation declaration. The Notation declaration helps XML application executive these binary files. A notation declaration is done as follows:
<p align="justify">
<!NOTATION GIF SYSTEM "lExplore.exe">
<p align="justify">
The above declaration tells the XML processor that whenever it encounters an entity of GIF type, it should use lexplore.exe to process it, A notation declaration once declared can be used throughout the XML document.<p align="justify"><b>Predefined Entities</b><p align="justify">
In XML certain characters are reserved for marking up the document. Characters like the angle brackets and the forward slash are interpreted as mark up and not as normal character data. If you want to use these characters as data, they must be escaped. To escape a character, you must use an entity reference to insert the character into the document. Some of the entity references have been pre defined. The following table lists the predefined entities:<p align="justify">


&It; - <(opening angle bracket)
<br>
&gt; - >(closing angle bracket)
<br>
&amp; - &(ampersand)
<br>
&apos; - -'(apostrophe)
<br>
&quot; - "(double quotation mark)


<p align="justify"><b>Internal and External Entities</b><p align="justify">
An internal entity is one in which the content of the entity is provided in the declaration part itself. An external entity refers to a storage unit in its declaration by using a SYSTEM or PUBLIC keyword. The SYSTEM identifier provides a pointer, usually an URL, where the content of the entity can be found. The public identifier provides an additional alternative method for the XML processor to retrieve the content of the entity. The PUBLIC identifier is useful when working with an entity that is publicly available.



Domain Name Search

www.


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