X
_XaToA_
hello
with the bellow code i print the XML'nodes values
but i want to know if one node comes empty (<node/>)
how can i know it?
thanks
/code
public void buscar(Node node, int level) {
NodeList listar = node.getChildNodes();
for (int i=0; i<listar.getLength(); i++) {
Node childNode = listar.item(i);
if (level==3 && childNode.getNodeType()==Node.TEXT_NODE) {
System.out.println(childNode.getNodeValue());
}
buscar(childNode, level+1);
}
}
with the bellow code i print the XML'nodes values
but i want to know if one node comes empty (<node/>)
how can i know it?
thanks
/code
public void buscar(Node node, int level) {
NodeList listar = node.getChildNodes();
for (int i=0; i<listar.getLength(); i++) {
Node childNode = listar.item(i);
if (level==3 && childNode.getNodeType()==Node.TEXT_NODE) {
System.out.println(childNode.getNodeValue());
}
buscar(childNode, level+1);
}
}