Skip Headers

# xs:any and xs:anyType Support

Previous

Next

In an XML schema, you can define elements and complex types that correspond to any data type using `xs:any` and `xs:anyType`. You can map objects to such elements and complex types using XML mappings `XMLAnyObjectMapping` and `XMLAnyCollectionMapping`.

Table: XML Mappings and XML Schema xs:any and xs:anyType lists the XML mappings to use with common applications of `xs:any` and `xs:anyType`. For more details, see the specified XML mapping type.

XML Mappings and XML Schema xs:any and xs:anyType

Use XML Mapping ... | To Map XML Schema Definition ...
--- | ---
See "XML Any Object Mapping" | Element with a singleFoot 1 unnamed complex type specified as `xs:any`.
See "XML Any Collection Mapping" | Element with an unnamed sequenceFootref 2 of complex types specified as `xs:any`. Element with a named sequenceFoot 2 of complex types of type `xs:anyType`. Root element of type `xs:anyType`.

Footnote 1 `minOccurs` and `maxOccurs` are both equal to 1.

Footnote 2 `maxOccurs` is greater than 1.