String (@Nullable Element element, String path, String defaultValue) { Element child = findChildByPath(element, path); if (child == null) return defaultValue; String childValue = child.getTextTrim(); return childValue.isEmpty() ? defaultValue : childValue; }