XSD Complex Types- XSD ANY - XSD

What is the use of XSD <any>?

<any> element is used for extending the XSD functionality and for extending a complexType element defined in one XSD by an element which is not defined in the schema.

Consider an example − person.xsd has defined person complexType element. address.xsd has defined address complexType element.



If we want to define a person with address in XML, then the following declaration will be invalid.


Use <xs:any>

In order to validate above person.xml, add <xs:any> to person element in person.xsd.


Now person.xml will be validated against person.xsd and address.xsd.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XSD Topics