tags:

views:

12

answers:

1

Hi, I want to define a tag in my schema for anything. It should be able 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.

+1  A: 

Yes. In fact you can just write

<xsd:element name="XYZ"/>

Check here for info: http://www.w3.org/TR/xmlschema-0/#anyType

asgerhallas
Okay that's short and easy :)
kasten