Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 86167 invoked from network); 15 Jun 2004 09:17:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Jun 2004 09:17:45 -0000 Received: (qmail 20124 invoked by uid 500); 15 Jun 2004 09:17:54 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 20062 invoked by uid 500); 15 Jun 2004 09:17:52 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 19964 invoked by uid 99); 15 Jun 2004 09:17:51 -0000 Received: from [62.23.147.178] (HELO mail.prima-solutions.com) (62.23.147.178) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 15 Jun 2004 02:17:51 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.4712.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C452B9.826E3BCA" Disposition-Notification-To: "Nassim Chalfouh" Subject: Evaluating null value in getValue? Date: Tue, 15 Jun 2004 11:16:58 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Evaluating null value in getValue? Thread-Index: AcRSuYCYhYPGF3A7RoqMercNVFmODQ== From: "Nassim Chalfouh" To: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C452B9.826E3BCA Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all, i have the following classes: public class Holder { private String name; private Holder sub; Holder() { name =3D "aaa"; sub =3D null; } public String getName() { return name; } public Holder getSub() { return sub; } } and the sample code: Holder h =3D new Holder(); JXPathContext jc =3D JXPathContext.newContext(h); System.out.println((String) jc.getValue("name")); System.out.println(jc.getValue("name=3D'aaa'")); System.out.println(jc.getValue("sub")); System.out.println(jc.getValue("sub=3Dnull")); The results are: =20 aaa true null false <---------- I expected true! i tried to change the=20 System.out.println(jc.getValue("sub=3D'null'")); but the output is still 'FALSE' how can i test a null value in getValue method? Thanks a lot for your help Best regards, =20 =20 =20 _______________________________________________________________________=20 Nassim Chalfouh | Quality Assurance Direct Line : +33 1 70 91 24 41=20 PRIMA SOLUTIONS Delivering the Unified Insurance Front-End http://www.prima-solutions.com _______________________________________________________________________=20 This e-mail message is a private and confidential correspondence intended only for use of the individual or entity=20 named above. If you are not the intended recipient, or the agent responsible to deliver it to the intended recipient,=20 you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.=20 If you have received this communication in error, please immediately notify us by return e-mail by clicking on the=20 e-mail address shown at the bottom of this note or by phone (+ 33 1 70 91 24 30), and delete it there after from your system. Thank you.=20 =20 ------_=_NextPart_001_01C452B9.826E3BCA--