Xerces appears to be DTD-consciouses, if you provide it with a DTD such as <!ELEMENT tag1 (tag2) > then the only element within tag1 will be the tag2, whereas without any DTD Xerces seems to assume something like: <!ELEMENT tag1 (#PCDATA, tag2, #PCDATA) >
However, this was an "accidental discovery", and I am not quite sure IF this is the desired behavior... -----Original Message----- From: Hasan Al-Sheboul [mailto:[EMAIL PROTECTED] Sent: Monday, February 18, 2002 11:23 AM To: [EMAIL PROTECTED] 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 } I'm trying to get rid of the empty text child nodes, like: <tag1> <tage2> TextB </tag2> </tag1> The above code returns back 3 children nodes for element <tag1>: TEXT (empty), ELEMENT (tag2), TEXT(empty). Can anyone help me out of how to get rid of the TEXT(empty) child nodes? Thanks! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
