Hello,
 
This might be just a stupid Java problem I'm overlooking.
 
The snippet below deals with a TEXT_NODE with a String value "and":
 
============================================
...
 
// Output the value of a text node.
// This should, and does, output "and".
System.out.println(node.getNodeValue());
 
// Test the node.
if (node.getNodeValue() == "and")
    System.out.println("it worked");
 
..
============================================
 
Now, I've confirmed that it's a text node before the snippet.  The first println outputs "and".  However, the "if" statement is false, so I never see "it worked".  How is this possible?
 
This seems so trivial...what am I missing?
 
Thanks in advance,
 
Ryan

Reply via email to