Advanced Java and Web Technologies for JNTUK
Blog providing beginner tutorials on different web technologies like HTML, CSS, Javascript, PHP, MYSQL, XML, Java Beans, Servlets, JSP and AJAX
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

Categories: XML. 1 Comment on XML Document Structure
0
(0)

This article explains about XML Document Structure. We will learn what does an XML document contain and some information about entities in XML documents.

 

An XML document often uses two supplementary files. One file specifies the syntactic rules and the other file specifies the presentation details about how the content of the document is displayed.

 

An XML document contains one or more entities that are logically related collections of information, ranging in size from a single character to a book chapter.

 

One of these entities, called the document entity, is always physically in the file that represents the document. A document entity might contain references to entities in other documents.

 


Subscribe to our monthly newsletter. Get notified about latest articles, offers and contests.


Many documents include information that cannot be represented as text, such as images. Such information units are generally stored as binary data and must be specified separately. Such entities are called binary entities.

 

Entity names can be of any length. They must begin with a letter, a dash or a colon. After the first character, a name can have letters, digits, periods, dashes, underscores or colons.

 

A reference to an entity is its name with a prepended ampersand and an appended semicolon. For example, if sun_image is the name of an entity, &sun_image; is a reference to it.

 

When several predefined entities must appear near each other in a XML document, their references clutter the content and make it difficult to read. In such cases, a character data section can be used.

 

The content of a character data section is not parsed by the XML parser, so it cannot include any tags. A character data section is represented as shown below:

<![CDATA[content]]>

 

An example of using character data section is given below:

<![CDATA[The last word of the line is >>> here <<<]]>

 

As the content of a character data section is not parsed by the XML parser, any entity references that are included are not expanded. For example, the content of the line:

<![CDATA[The form of a tag is &lt;tag name&gt;]]>

 

is as follows:

The form of a tag is &lt;tag name&gt;

 

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Suryateja Pericherla

Suryateja Pericherla, at present is a Research Scholar (full-time Ph.D.) in the Dept. of Computer Science & Systems Engineering at Andhra University, Visakhapatnam. Previously worked as an Associate Professor in the Dept. of CSE at Vishnu Institute of Technology, India.

He has 11+ years of teaching experience and is an individual researcher whose research interests are Cloud Computing, Internet of Things, Computer Security, Network Security and Blockchain.

He is a member of professional societies like IEEE, ACM, CSI and ISCA. He published several research papers which are indexed by SCIE, WoS, Scopus, Springer and others.

Note: Do you have a question on this article or have a suggestion to make this article better? You can ask or suggest us by filling in the below form. After commenting, your comment will be held for moderation and will be published in 24-48 hrs.

1 Comment

You can follow any responses to this entry through the RSS 2.0 feed.

If s᧐me one wants eⲭpert view regarding blogging after
that i suggest him/her to visit this ѡeb site, Keep up
the good work.

Leave a Reply

Your email address will not be published. Required fields are marked *