What is XML Schema? Give an example of it?
Printable View
What is XML Schema? Give an example of it?
chema is a way to describe and validate data in an XML environment.What do you mean by give example of it?
Firstly its not "CHEMA" its "Schema" and proving a example means giving a sample code plz look at below.Quote:
Originally Posted by revvv1234
Thanks.Quote:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Thanks i know that example is like this only but got confused because some examples are too big.Quote:
Originally Posted by debasis
I didn't get you you have written "i know that example is like this only", you mean there won't be any other example available for xml schema?Sorry but there are lots of things we can do with it and lots of example we can make from this.Quote:
Originally Posted by revvv1234
Thanks.
Ya i know there are lot of things we can do.It's just that i did not want to type that much of exmple.Anyways i am working on it.Thanks.Quote:
Originally Posted by debasis
Its right its very huge and writing code here is not possible for all and its also not so easy and its a very difficult script.Quote:
Originally Posted by revvv1234
Ya.Scripting is very difficult but some people manages to learn easily.Currently i am learning but not easily.