开发者

XML empty element as boolean true

开发者 https://www.devze.com 2023-02-19 10:31 出处:网络
What issues,开发者_如何学JAVA if any, are there from defining an XML empty element to mean true in an XML schema rather than using the built in boolean type?

What issues,开发者_如何学JAVA if any, are there from defining an XML empty element to mean true in an XML schema rather than using the built in boolean type?

E.g. representing true as

<myoption /> vs <myoption>true</myoption>

And representing false as

'myoption' element absent vs <myoption>false</myoption>

Best Regards


From a database point of view null is neither true nor false.

What about

<myoption state="true" />
<myoption state="false" />

?

0

精彩评论

暂无评论...
验证码 换一张
取 消