/** * Returns the first child element value identified by its name. * * @param element the DOM element to analyze * @param childElementName the child element name to look for * @return the extracted text value, or <code>null</code> if no child * element found */ public static String getChildElementValueByTagName(final Element element, final String childElementName) { final Element child = getChildElementByTagName(element, childElementName); return child != null ? getTextValue(child) : null; }
DomUtils.getChildElementByTagName(root, VERSION_ELEMENT); if (existingVersionElement == null) { DomUtils.createChildElement(VERSION_ELEMENT, root, pom).setTextContent(DEFAULT_VERSION);
DomUtils.getChildElementByTagName(existingElement, element.getKey()); if (childElement != null && DomUtils.getTextContent(childElement, "").equals(element.getValue())) {