How can I check with the DOM-API, if a tag is empty (<mytag/>) or not (<mytag>data</mytag>)?
Created May 4, 2012
Davanum Srinivas
Element element = ....; String nodeValue = element.getNodeValue(); if(nodeValue==null||nodeValue.length()==0) System.out.println("Element is empty"); else System.out.println("Element value:" + nodeValue);