Please visit our sponsors !
The simpleContent Element
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:
<xsd:element name="shoesize">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:integer">
<xsd:attribute name="country" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
|
Jump to: Top of Page
or HOME or
Printer friendly page
Search W3Schools:
What Others Say About Us
Does the world know about us? Check out these places:
Dogpile
Alta Vista
MSN
Google
Excite
Lycos
Yahoo
Ask Jeeves
We Help You For Free. You Can Help Us!
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 1999-2002 by Refsnes Data. All Rights Reserved
|