IndiaWebDevelopers.comA global technology company specializing in web applications and enterprise solutionsContact UsAbout UsFAQHome
India Web Developers - A global technology company specializing in web applications and enterprise solutions  
YOU ARE HERE: TECHNOLOGY > XML
 

Technology
Design Tools
Open Source
Java-Centric Technologies
Oracle 9i
Microsoft-Centric Technologies
ASP.NET
Cutting-Edge Technologies
Search Engine Technologies
XML
ZOPE
Related Links
Other Links
Technology
Design Tools
Open Source
Java-Centric Technologies
Oracle 9i
Microsoft-Centric Technologies
ASP.NET
Cutting-Edge Technologies
Search Engine Technologies
XML
ZOPE
Related Links
Other Links

SEARCH
 

Johnson P. Thomas is a web developer.

By Johnson P. Thomas

   
  Check out our collection of XML articles:
XML: The future
XML: Technology of Choice
XML in Parts
XML: Pros and Cons
XML ...future of the web
XML ...the future of business
XML Applications
XML Resources
   

Parts of an XML Document

The various building blocks of an XML document is shown in the document below

The Prolog consisits of two internal blocks .
The first block defines the XML version declaration which is optional.

<?xml version = "1.0" ?>

DTD(document type definition)


Prolog

Version
Declaration

DTD

<root>

.......body

<root>

Parts of an XML Document

For any existing XML document, the XML specifications defines a set of rules using a DTD to which the XML document conforms.A DTD can either be an external or an internal file.A DTD can be declared internally within the document type declaration
(example: lets consider the DTD for personal information)

< ! DOCTYPE name [
....<!ELEMENT name (first_name+, .........................middle_initial+, last_name+)>
....<!ELEMENT first_name (#pcdata)>
....<!ELEMENT middle_initial (#pcdata)>
....<!ELEMENT last_name (#pcdata)>
]>

If the DTD is an external file we link to the document in the following way.

<!DOCTYPE name SYSTEM "name.dtd" >

Well formed and Valid Documents

The XML specifications defines 2 types of documents.
Well formed
Valid documents.

A Well formed document must confirm to the following rules.

The document must contain atlest one element.
The document must contain a root element which is unique and surrounds the whole document.
All other elements must be within the root element with no overlapping.
There should be no unclosed tags.Every start tag must have an end tag.

Lets take the example of personal information once again.the following is a well defined document for that

<name>
....<first_name>Steve</first_name>
....<middle_initial>N</middle_initial>
....<last_name>Robinson</last_name>
</name>



Valid documents
on the other hand should not only be well formed but also have a DTD to which the well formed documents conforms to.This means that it must only use the elements which have been declared in the DTD.

Extensible Style Sheets(XSL)

XSL is used for the display of an XML document.

An XSL document consists of a number of template rules that have 2 parts.

A Pattern part
An Action part

The pattern part selects an object from the source document .

The action part of the rule describes what styling is to be applied to it. XSL takes more complex stylesheet and simplifies it.It also supports CSS.

XSL helps to display information in a number of different ways without going back to the server.

XML Parser

A parser is a piece of software that makes sure the XML document is valid or at least well-formed. Parsers are extremely complex to develop and so only experienced programmers will design one. Once a parser is developed, other programmers and Web designers can easily reuse it .A parser is part of XML that you will never see.

Related Links - XML

 
 
 
 
Contact us with your project needs for a Quick Reply!
 
     
 


Web Development India
The web division of Stylus Systems Pvt Ltd www.stylusinc.com ©1999-2008