/** @return null if child doesn't exist. */ public static String allTextFromUniqueChild(Element elem, String childTagName, boolean trim) throws DOMException { Element uniqueChild = uniqueChildByTagName(elem, childTagName); if (uniqueChild == null) return null; else return DomParseUtils.allTextFromElement(uniqueChild, trim); }
public static String allTextFromUniqueImmediateChild(Element elem, String childTagName) throws DOMException { Element uniqueChild = uniqueImmediateChildByTagName(elem, childTagName); if (uniqueChild == null) return null; return DomParseUtils.allTextFromElement(uniqueChild); }