.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

What is XSD Schema and Syntax to create the schema for XML file?

Posted By: Jegan R     Posted Date: November 01, 2010    Points:2   Category :Windows Application
What is XSD Schema and Syntax to create the schema for XML file?

Responses
Author: Suderson Sarathy             
Posted Date: November 19, 2010     Points: 5   

XSD schema is the one which defines your XML.

It defines how your XML is going to be.

It is like a declaration in the normal programming language.

int a = 5, means a is an integer varaiable which can hold a value called 5.

Example for Schema is,

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="StudentDetails">
<xs:complexType>
<xs:sequence>
<xs:element name="Student">
<xs:complexType>
<xs:attribute name="Sid" type="xs:int" />
<xs:attribute name="Sname" type="xs:string" />
<xs:attribute name="Sclass" type="xs:string" />
<xs:attribute name="Srank" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Hope this helps.



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend