06-03-2013, 04:42 PM
Introduction to XML Schema
Introduction to XML.ppt (Size: 176.5 KB / Downloads: 18)
XML Schemas Support Data Types
One of the greatest strength of XML Schemas is the support for data types.With support for data types:It is easier to describe allowable document content It is easier to validate the correctness of data It is easier to work with data from a database It is easier to define data facets (restrictions on data) It is easier to define data patterns (data formats) It is easier to convert data between different data types
XML Schemas use XML Syntax
Another great strength about XML Schemas is that they are written in XML.Some benefits of that XML Schemas are written in XML:You don't have to learn a new language You can use your XML editor to edit your Schema files You can use your XML parser to parse your Schema files You can manipulate your Schema with the XML DOM You can transform your Schema with XSLT
XML Schemas Secure Data Communication
When sending data from a sender to a receiver, it is essential that both parts have the same "expectations" about the content.With XML Schemas, the sender can describe the data in a way that the receiver will understand.A date like: "03-11-2004" will, in some countries, be interpreted as 3.November and in other countries as 11.March.However, an XML element with a data type like this:<date type="date">2004-03-11</date>ensures a mutual understanding of the content, because the XML data type "date" requires the format "YY-MM-DD".
XML Schemas are Extensible
XML Schemas are extensible, because they are written in XML.With an extensible Schema definition you can:Reuse your Schema in other Schemas Create your own data types derived from the standard types Reference multiple schemas in the same document
What is a Simple Element?
A simple element is an XML element that can contain only text. It cannot contain any other elements or attributes.However, the "only text" restriction is quite misleading. The text can be of many different types. It can be one of the types included in the XML Schema definition (boolean, string, date, etc.), or it can be a custom type that you can define yourself.You can also add restrictions (facets) to a data type in order to limit its content, or you can require the data to match a specific pattern
DOM
Memory tree representation Lets you move back and forth ,up and downEasy to use and has clean interfaceMemory intensive for larger XML documentsBetter choice for complex XML structures Can be used for smaller files as memory intensive.