Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Why getNodeValue() method does not give the string after (&)

843834Jul 13 2001 — edited Jul 13 2001
Please help me! Below is the XML file's content:

<root>
<test>Algebraic&amp; Statistical calculator</test> </root>

When I want to get the value of by following quotes:
String value = "";
NodeList children = node.getChildNodes();
for(int i = 0; i < children.getLength(); i++ ) {
Node ci = children.item(i);
if( ci.getNodeType() == Node.TEXT_NODE ) {
value = value + ci.getNodeValue();
}
}

it gives me only Algebraic(Rest part after & gets truncated)can't I get the entiretext inside it?

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 10 2001
Added on Jul 13 2001
4 comments
108 views