Professional Documents
Culture Documents
www.satyam.com
Introduction
XSD(XML schema definition) is W3C recommended. Specifies how to formally describe the elements in an XML document. A schema is an abstract representation of an object's characteristics and relationship to other objects. An XML schema represents the interrelationship between the attributes and elements of an XML object.
www.satyam.com
XML Schema
www.satyam.com
defines elements that can appear in a document defines attributes that can appear in a document defines which elements are child elements defines the order of child elements defines the number of child elements defines whether an element is empty or can include text defines data types for elements and attributes defines default and fixed values for elements and attributes
Advantages
XSD has several advantages over earlier XML schema languages, such as document type definition (DTD) or Simple Object XML (SOX). It's more direct: XSD, in contrast to the earlier languages, is written in XML, which means that it doesn't require intermediary processing by a parser. Other benefits include self-documentation, automatic schema creation, and the ability to be queried through XML Transformations (XSLT).
www.satyam.com
Disadvantages
The language is unnecessarily complex.
www.satyam.com
Practice Scenario
Create a XML schema (XSD file) for student data and use it in XML file.
www.satyam.com