<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META content="MSHTML 5.00.3211.1700" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=505194901-26042001>JDOM
ignores 0 & 1 now in the same way as "true" and "false".
getBooleanValue() was removed a *long* time ago. You should update your
version of JDOM :-)</SPAN></FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">
<DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Zoltan Grose
[mailto:zgrose@pacbell.net]<BR><B>Sent:</B> Wednesday, April 25, 2001 7:42
PM<BR><B>To:</B> jdom-interest@jdom.org<BR><B>Subject:</B> [jdom-interest]
Attribute.getBooleanValue()<BR><BR></DIV></FONT>
<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></BLOCKQUOTE></BODY></HTML>