XmlSchemaSimpleContentRestriction または XmlSchemaSimpleContentExtension の 1 つを取得します。
Overrides Public Property Content As XmlSchemaContent
[C#]
public override XmlSchemaContent Content {get; set;}
[C++]
public: __property XmlSchemaContent* get_Content();public: __property void set_Content(XmlSchemaContent*);
[JScript]
public override function get Content() : XmlSchemaContent;public override function set Content(XmlSchemaContent);
プロパティ値
XmlSchemaSimpleContentRestriction クラスまたは XmlSchemaSimpleContentExtension クラスに格納される内容。
解説
simpleContent 要素を使用すると、要素を持たない単純型を格納する要素として指定し、要素の内容の値を制限したり、属性で内容を拡張したりできます。
使用例
simpleContent 要素を使用すると、次の要素宣言は、要素の内容を単一の属性 (sizing) を持つ decimal 型として定義する complexType を格納します。
<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>
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
XmlSchemaSimpleContent クラス | XmlSchemaSimpleContent メンバ | System.Xml.Schema 名前空間