Forum Stats

  • 3,875,272 Users
  • 2,266,902 Discussions
  • 7,912,132 Comments

Discussions

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

843834
843834 Member Posts: 49,972
edited Jul 13, 2001 4:45PM in Java Technology & XML
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

This discussion has been closed.