I wish to share the same to my blog readers with my short articles. Let us enter into the topic,
XSD:
The abbreviation for XSD is XML Schema definition. This will define, how a XML should look like.
If we think about the XML (its worth to write about XML data type in SQL server. Let me do it in my next article) will be of two types,
1. Typed XML (XML bounded to XSD definition)
2. Untyped XML (XML is not bounded to any XSD definition).
As of now, We need to concentrate on typed XML. In this case,
1. A schema will be created - It will explain, how a XML should look like.
2. Create a XML which will abide the schema created already.
On looking into the structure of the shema,
1. It should be started with the XML Namespace.
2. Followed by the root elements.
3. The root element may have any number of child element.
Let's see a sample XSD,
The XMLName space should be inherited from the namespace
http://www.w3.org/2001/XMLSchema
Here is the code to create XSD,
We can see how XML is created based on this shema in my future articles.
Thanks and Regards,
Venkatesan Prabu .J
No comments:
Post a Comment