Export (0) Print
Expand All

XmlSchemaSimpleContent.Content Property

Namespace:  System.Xml.Schema
Assembly:  System.Xml (in System.Xml.dll)

public override XmlSchemaContent Content { get; set; }

Property Value

Type: System.Xml.Schema.XmlSchemaContent
The content contained within the XmlSchemaSimpleContentRestriction or XmlSchemaSimpleContentExtension class.

The simpleContent element enables you to specify an element as containing a simple type with no elements and restrict the value of the element's content or extend the content with attributes.

Using the simpleContent element, the following element declaration contains a complexType that defines the content of the element as a decimal type with a single attribute (sizing):

 <xs:element name="shoeSize">
   <xs:complexType>
     <xs:simpleContent>
       <xs:extension base="xs:decimal">
         <xs:attribute name="sizing">
           <xs:restriction base="xs:string">
             <xs:enumeration value="US"/>
             <xs:enumeration value="European"/>
             <xs:enumeration value="UK"/>
             <xs:enumeration value="Japan"/>
           </xs:restriction>
         </xs:attribute>
       </xs:extension>
     </xs:simpleContent>
   </xs:complexType>
 </xs:element>

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft