Total members 11808 |It is currently Thu Dec 12, 2019 2:06 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





- 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 .


Code:
<xs:element name="studentname" type="string"   default="no name"/>

Default value is assigned automaticlly when you don;t put a value .

Code:
<xs:element name="studentname" type="string"   fixed="samy"/>

Automatic value assignment to the element with a value you can't change later.



_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : lesson2 : XSD simple element
 Pop the element off the end of array     -  
 Usage of big element tag.     -  
 print element in 2d matrix     -  
 UnSet array element     -  
 Array element navigation     -  
 lesson1 : <schema> Element     -  
 access element in array C++     -  
 How to make html element hidden using CSS     -  
 Change and get html content of element     -  
 opacity of HTML element- transparent     -  



Topic Tags

XSD Elements






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com