import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
class Main {
public static String getStringElementValue(Element el, String child,
String defaultValue) {
try {
return ((Element) el.getElementsByTagName(child).item(0))
.getChildNodes().item(0).getNodeValue();
} catch (Exception e) {
return defaultValue;
}
}
}