How to use XSD Empty Element in XML
In this article I am going to explain about XSD Empty Element in XML.
XSD Empty Element
An XSD Empty Element is an such type of element that does not contain Contents. Its only contain attribute.
<Employee name="EmpId" />
In above example "Employee" have no content. For defined type with no content we must defined that allow element in its content.
<xs:attribute name="EmpId" type="xs:positiveInteger"/>
For defined type we can also give the complex type element name.
<xs:element name="Employee" type="Detail"/>
<xs:attribute name="Empid" type="xs:positiveInteger"/>
You may also want to read these related articles: here
Ask Your Question
Got a programming related question? You may want to post your question here