Understanding XML Document Structure  Hot PDF Print E-mail
Tag it:
Delicious
Furl it!
Digg
NewsVine
Reddit
YahooMyWeb
Technorati
Articles Reviews XML
Written by John Wiley   
Friday, 21 September 2007

XML documents consist of several elements that are similar to the tags used to make up an HTML document. These elements are used to provide context to the information that they surround. XML documents can be developed to be document-centric, meaning that they are intended to be used by humans. However, XML documents can also be data-centric, meaning that they are intended to be used by another application and will generally contain data extracted from a database or data that will be submitted to an API.


In todayís rapid communication age, not only mobile phones have become a necessity of every individual but now ip phones are considered as top priority then setting up an after sales service call center. Therefore most of the internet phone provider services can be obtained to have such internet bases communication. In order to have quality web hosting services one should analyze different features like after sales support, serverís capability and bandwidth. The website design is usually selected on the nature of products or services to be offered on that particular website. The web site design also depends on the budget of the company. The next step after website development is web hosting that can availed from various online companies including webhosting com.

XML documents consist of the three following components:

            ✦ Prologue
            ✦ Elements
            ✦ Attributes

Prologue

Usually XML documents begin with a prologue like the following:

<? xml version=”1.0” encoding=”UTF-8”?>

The prologue, always enclosed within angle brackets (<>), declares the version of XML being used (the current version is 1.0) and the encoding standard. If the prologue is not present, the defaults (XML version 1.0 and an encoding standard of UTF-8) are assumed; however, for interoperability purposes you should always included the prologue. The prologue is the only element that has a slightly different syntax from the others: It begins with a question mark (?).

Elements

The rest of an XML document is made up of a sequence of elements.
Typically an XML element will have the following format:

<element_tag_name attribute1_name=”attribute_value”
attribute2_na...>element_content</element_tag_name>

Elements may contain either data or other nested elements; however, note that unlike in HTML documents, in XML documents all element tags must have a closing tag. Thus the HTML tags for a line break, <BR>, and for a horizontal line, <HR> would not be valid by themselves; they need to be closed with </BR> or </HR> respectively. However, if no content needs to be enclosed, the start and end tags may be compressed as <BR/> or <HR/>.

Attributes

Within the element tag declaration it is also possible to include attributes that may be used to further qualify the tag. Unlike in HTML, in XML the possible attributes and their values can be defined in an accompanying DTD or schema. (DTDs and schemas are covered later in this chapter.) Also, in XML documents tag and attribute definitions are case-sensitive. Thus <important> and <IMPORTANT> are viewed as different tags in XML because they are different cases. Let’s now take a look at how XML documents are processed. 


User reviews

There are no user reviews for this item.

Add new review




Powered by jReviews

Last Updated ( Friday, 11 January 2008 )
 
< Prev   Next >