Total members 9952 | Gratitudes |It is currently Sat Feb 11, 2012 2:16 pm Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 1 post ] 
Author Article
 Article subject: lesson8: XSD Complex Type Mixed Content
PostPosted: Fri Mar 06, 2009 1:26 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2103
Location: Earth
Has thanked: 39 time
Have thanks: 57 time

XSD Complex Type Mixed Content :
You can add text with the elements in your XML file. You define it like in the following example
Code:
<xs:element name="student">
  <xs:complexType mixed="true">
    <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="age" type="xs:positiveInteger"/>
      <xs:element name="birthdate" type="xs:date"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>


XML example:

Code:
<student>
Name of the student is <name> Tom Hanks</name>
Student age is <age>22</age>
Birth date of student <birthdate>11/1/1990</birthdate>
</student>


Note: The mixed attribute of complexType should equal true.

You can define name to the complex type and refer to it in the element.
Code:
<xs:element name="student" type=”studentType” />
  <xs:complexType name=”studentType” mixed="true">
    <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="age" type="xs:positiveInteger"/>
      <xs:element name="birthdate" type="xs:date"/>
    </xs:sequence>
  </xs:complexType>

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 1 post ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 Need to Display Content using JavaScript in HTML page  Scripting Language  stankov  0
 lesson6: XSD Complex Empty Elements  XSD Tutorials  msi_333  1
 overriding the direction of text within body content  HTML examples  msi_333  0
 set MIME type in link  HTML examples  msi_333  0
 Importance of Content?  Google  JhnMichle  2

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Article | Next Article 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team