NEWBIE: How to store boolean logic in XML?
Posted on 2007-11-21
I have a dumb question. Assume I want to store three test questions, in which BOTH of the first two are true, OR the third is true. For instance, "If ((Birdie is blue) AND (Duckie is yellow)) OR (Bear is purple)..."
(I said this was a dumb question...)
One way I can think of storing this would be to literally include something like parentheses and logical operators, like this:
<TEST>Birdie is blue</TEST>
<TEST>Duckie is yellow</TEST>
<TEST>Bear is purple</TEST>
But there must be a better way, right? The PARENs, in particular, seem very klutzy. Is there a way to get their functionality directly from XML?