Hi,
I want to search in my xml file for a value of text element(= the value). And then processing the node value.
//Traversalling recursively in the tree
private static void processNodeRecursively (Node node, String rule)
{
if((node.getNodeValue()).equals(rule))
{
//some code for processing the node
}
for(Node child = node.getFirstChild(); child != null;
child = child.getNextSibling())
{
processNodeRecursively(child, rule);
}
}
But with this method, the program doesnt travel in the xml file. If i change node.getNodeValue in node.getNodeName then it travels nicely but i dont need the name of an element but the value of a text element. So any one some advice for searching a text value in an xml file.