XSD Complex Types- XSD Complex Element Only - XSD

What is the use of XSD Complex Element Only?

Complex Elements will only have other elements. See below example

We can declare Complex element-only element using below methods

Use type attribute

Define a complex type element "StudentType" and then create an element called student of type StudentType.

In the above example, we've used sequence. It is used to maintain the order in which the elements are to be present in the XML. If order is not maintained, then XML will not be validated.

Use ComplexType alone

Define an element of complexType with the required attribute element only.

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

XSD Topics