I want to define a tag in my schema for anything. It should be 开发者_如何学Cable to contain any combination of tags and text. So far I've found
<xs:complexType name="customType" mixed="true">
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute processContents="lax"/>
</xs:complexType>
I'm wondering if there is a shorter way. Something like
<xs:element name="custom" type="anything"/>
Thanks for your time.
Yes. In fact you can just write
<xsd:element name="XYZ"/>
Check here for info: http://www.w3.org/TR/xmlschema-0/#anyType
精彩评论