private String getChildText()

in src/main/java/org/apache/sling/contentparser/xml/internal/XMLContentParser.java [177:186]


    private String getChildText(Element element, String childName) throws IOException {
        List<Element> children = getChildren(element, childName);
        if (children.isEmpty()) {
            return null;
        } else if (children.size() == 1) {
            return children.get(0).getTextContent();
        } else {
            throw new IOException("Found multiple elements with name '" + childName + "': " + children.size());
        }
    }