Tuesday, April 19, 2005

Schema in XML and its benifit?

Schema in XML and its benifit?

Its a file which describes the structure of a XML document.
Most popular schema is DTD schema.



hasim
MCAI


matin
MCAII


mamnoon
MCAIII


The DTD for the above XML will be as follows.





It specifies four tags (namely hostel,student,name and class) and further specifies which tags are required to occur in which place.It gives a hierchical structure of the XML file.

From the first line it tells that all elements shud muct b inside the hostel element and there can b more than one student element inside this hostel element( as + sign is there).In the second line it tells that there will be two elements inside the student tag namely name and class.In the third and fourth line it tells that inside the name and class there will be parse data.

Wats the benifit of schema?
--------------------------

If a xml file is attached with a proper DTD schema,we no need to look for children and parents however big the xml file may be.

This post is not working fine..If still have curiosity bout it,then click..
SUPPLEMENT XML FILE

Labels:

0 Comments:

Post a Comment

<< Home