XML Schema simpleContent Element
Complete XML Schema Reference
Definition and Usage
The simpleContent element contains extensions or restrictions on a text-only complex
type or on a simple type as content and contains no
elements.
Element Information
- Parent elements: complexType
Syntax
<simpleContent
id=ID
any attributes
>
(annotation?,(restriction|extension))
</simpleContent>
|
(The ? sign declares that the element can occur zero or one time inside the
simpleContent element)
| Attribute |
Description |
| id |
Optional. Specifies a unique ID for the element |
| any attributes |
Optional. Specifies any other attributes with non-schema
namespace |
Example 1
Here is an example of an XML element (<shoesize>) that contains text-only:
|
<shoesize country="france">35</shoesize>
|
The following example
declares a complexType, "shoesize", with its content defined as a
integer data type and with a country attribute:
<xs:element name="shoesize">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="country" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
|
Complete XML Schema Reference
Create a free Flash website with our simple, online web design editing platform. Stunning templates
and user-friendly tools make website building easy and fun.
Start Creating your free website now!

Need an easy way to get data into XML, or transform XML to another format?
MapForce lets you map XML data to/from any combination of XML, database, flat file,
Excel 2007, XBRL, or Web services data. Then it transforms data instantly or
auto-generates royalty-free code for recurrent conversions.
New features in Version 2010!
- Easy-to-use, graphical data mapping interface
- Instant data transformation
- XSLT 1.0/2.0 and XQuery code generation
- Java, C#, and C++ code generation
- Advanced data processing functions
- Support for all major relational databases including SQL Server, IBM DB2, Oracle, and more
- Visual Studio & Eclipse integration
- Available in 32-bit and 64-bit versions
Download a fully-functional trial today!
|
|
|
|