How can I represent, true/false as the Boolean and "true"/"false" the strings in XML?
Eg.
<problem>false</problem>
<problem>problem_name</problem>
Or is there a better way to do this?
According to the spec, you can use the literal values true, false, 1, 0 but you should use true or false only.
Chris
"3.2.2 boolean
[Definition:] boolean has the ·value space· required to support the mathematical concept of binary-valued logic: {true, false}. 3.2.2.1 Lexical representation
An instance of a datatype that is defined as ·boolean· can have the following legal literals {true, false, 1, 0}. 3.2.2.2 Canonical representation
The canonical representation for boolean is the set of literals {true, false}."
It is a common unwritten rule that says in xml as a boolean value we should use: 'true' and 'false'
You can look here for further information: http://www.w3.org/TR/xmlschema-2/#boolean
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With