private InfoDirective buildInfoDirective(Element element) { if (null == element) { return null; } else { String title = ElementHelper.getAttribute(element, "title"); Element child = ElementHelper.getChild(element, "description"); if (null == child) { return new InfoDirective(title, null); } else { String value = ElementHelper.getValue(child); String description = trim(value); return new InfoDirective(title, description); } } }