Restricting empty elements in xsd

Posted by Chris Welsh on Stack Overflow See other posts from Stack Overflow or by Chris Welsh
Published on 2010-03-08T08:01:54Z Indexed on 2010/03/08 8:06 UTC
Read the original article Hit count: 549

Filed under:
|
|

Is there a way to prevent empty elements of the form <myElement/> being used in your xml? In other words, can you specify in your xsd that <myElement/> is invalid?

Using nillable="false" doesn't work, nor does minOccurs="1" - both of those allow <myElement/>.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about xsd