Total members 11735 |It is currently Wed Aug 22, 2018 1:12 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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>





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

  Related Posts  to : lesson8: XSD Complex Type Mixed Content
 Complex Numbers     -  
 lesson5: XSD Complex elements     -  
 Complex numbers calculator (C++)     -  
 lesson6: XSD Complex Empty Elements     -  
 lesson7: XSD Complex Text-Only Elements     -  
 solve the complex numbers and do operations on it     -  
 lesson9: XSD Complex Types Indicators     -  
 Type conversions     -  
 Type Conversion     -  
 Is String a data type     -  



Topic Tags

XSD Elements
cron





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