QDoc Specifications and Standards > QAD Enterprise Applications-Specific QDoc Syntax > Required vs. Optional Elements
  
Required vs. Optional Elements
In general, XML schema allows the child elements under a given parent to be defined as required or optional through the minOccurs and maxOccurs attributes. The default is minOccurs=1, maxOccurs=1.However, to make maintenance of the XML schema easier over time, virtually all QDoc elements are defined as optional (minOccurs=0). This approach also supports many common API scenarios in which a common data object is used in multiple API methods, but with context-specific validation that determines whether the elements are required or optional. It is the responsibility of the QAD Enterprise Applications application to throw exceptions if the requestor does not provide a required field using present QAD Enterprise Applications validation logic, rather than relying on XML schema syntax checking.