An XML Schema describes the structure of an XML document. The XML Schema language is also referred to as XML Schema Definition (XSD).
What is an XSD?
1. XSD stands for XML Schema Definition
2. An XML schema is used to define the structure of an XML document.
3. Schemas are successors to DTDs.
4. Schemas are another approch used by the XML parser to validate an XML document.
4. Schemas are another approch used by the XML parser to validate an XML document.
5. It is a text file with .xsd extension
What XSD defines?
1. Defines elements that can appear in a document.
2. Defines attributes that can appear in a document.
3. Defines the number of child elements and their sequence.
4. Defines whether an element is empty or can include text.
5. Defines data types for elements and attributes.
6. Defines default and fixed values for elements and attributes.
Why Use XML Schemas?
XML Schemas Support Data Types
1. One of the greatest strength of XML Schema is the support for data types.
2. With support for data types:
Why Use XML Schemas?
XML Schemas Support Data Types
1. One of the greatest strength of XML Schema is the support for data types.
2. 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 Schema Structure
A simple XML document
<?xml version=”1.0”> <email> <to>Vinod</to> <from>Ashok</from> <subject>Reminder(Party)</subject> <body>Don't forget me this weekend!</body> </email>
The XML Schema for the above example
<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace=”http://www.waytoeasylearn.com” elementFormDefault=”qualified”> <xs:element name="email"> <xs:element name="to" type="xs:string"/> <xs:element name="from" type="xs:string"/> <xs:element name="subject" type="xs:string"/> <xs:element name="body" type="xs:string"/> </xs:element> </xs:schema>
Main XML Schema Data types
General Data Types
Types representing Dates and Times
DTD-compatible Types
XML Schemas Data Types
One of the greatest strength of XML Schemas is the support for data type. An XSD comprises of two kinds of data types.
1.Simple Type
2.Complex Type
1.Simple Type
2.Complex Type
Wow,great information. I am sure the information on your blog will help others,Thanks.
ReplyDeletejavascript training in chennai
javascript course
Hibernate Training in Chennai
core java training in chennai
Spring Training in Chennai
QTP Training in Chennai
Manual Testing Training in Chennai
JMeter Training in Chennai
This was a great blog. Really worth reading it. Thanks for spending time to share this content with us.
ReplyDeleteSpoken English Classes in Chennai
Spoken English Class in Chennai
Spoken English in Chennai
IELTS Training in Chennai
IELTS Chennai
Best English Speaking Classes in Mumbai
Spoken English Classes in Mumbai
IELTS Mumbai
IELTS Center in Mumbai
IELTS Coaching in T Nagar
I gathered lots of information from your blog and it helped me a lot. Keep posting more.
ReplyDeleteSalesforce Training in Chennai
salesforce training institute in chennai
Salesforce Course
ccna Training in Chennai
Ethical Hacking course in Chennai
PHP Training in Chennai
Web Designing Training in Chennai
Salesforce Training in Anna Nagar
Salesforce Training in Vadapalani
Salesforce Training in Thiruvanmiyur