if (child.getNodeType() == Node.TEXT_NODE) {
value = child.getNodeValue();
if (mandatory && "".equals(value.trim())) {
throw new ConfigurationException(elem.getNodeName()
+ " text is empty");
}
break;
}
}
if (mandatory && (value == null)) {
throw new ConfigurationException(elem.getNodeName()
+ " element does not contains text");
}
} else {
throw new ConfigurationException("Argument element can't be null");
}
return value;
}