<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi. JDOM newbie here. :) </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I'm using JDOM in a servlet project and I was about to change
all my True/False type attributes in the XML to be 0 / 1 when I decided to
peek at the JDOM source to see just what kind of values were considered boolean.
To my surprise, 0 and 1 wasn't on the list. Was this an intention omission? It
seems to be a fairly common representation. I did a quick search through the
archives and didn't see anything on the topic.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Loving JDOM so far!</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>-zoltan</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>For convenience I've copied the source (beta6)
below:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> public boolean getBooleanValue() throws
DataConversionException {<BR> if
((value.equalsIgnoreCase("true"))
||<BR>
(value.equalsIgnoreCase("on"))
||<BR>
(value.equalsIgnoreCase("yes")))
{<BR> return
true;<BR> } else if
((value.equalsIgnoreCase("false"))
||<BR>
(value.equalsIgnoreCase("off"))
||<BR>
(value.equalsIgnoreCase("no")))
{<BR> return
false;<BR> } else
{<BR> throw
new DataConversionException(name,
"boolean");<BR>
}<BR> }</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV></BODY></HTML>