/** * Checks whether an element defines a complete list. If this is the case, * extended list handling can be applied. * * @param element the element to be checked * @return a flag whether this is the only element defining the list */ private static boolean isSingleElementList(final Element element) { final Node parentNode = element.getParentNode(); return countChildElements(parentNode, element.getTagName()) == 1; }