Joined: Tue Mar 27, 2007 10:55 pm Posts: 2103 Location: Earth Has thanked: 39 time Have thanks: 56 time
- XSD simple element : XSD simple element is the element that don't include any other elements.It can be one of many different types and they are : xs:string xs:decimal xs:integer xs:boolean xs:date xs:time
How to define simple element :
Code:
<xs:element name="studentname" type="string"/>
The name attribute define the name of element (which is here "studentname" ) and the type attribute defines the element data type (which is "string" here) .
Example of XML to this element definition :
Code:
<studentname> jozeph </studentname>
Element default values : You can define a default value for the simple element using the "default" attribute .