----- Original Message ----- 
From: Hasan Al-Sheboul <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 18, 2002 8:23 PM
Subject: TEXT empty child nodes?


> Hi,
> 
> for the following code (xerces2-J, DOM model)
> 
> case Node.TEXT_NODE:
>     String str = getNodeValue();
>     if ( ( !str.equals("\n")) && (!str.equals(null)) ) {
>         // do something
>     }
> 
if you have no DTD, use (!str.equals("")) as a test. The string is not null, it 
is just empty, and skip the (!str.equals("\n"))




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to