in src/main/java/org/apache/sling/jcr/contentparser/impl/XmlContentParser.java [174:185]
private String getChildText(Element element, String childName) {
List<Element> children = getChildren(element, childName);
if (children.isEmpty()) {
return null;
}
else if (children.size() == 1) {
return children.get(0).getTextContent();
}
else {
throw new ParseException("Found multiple elements with name '" + childName + "': " + children.size());
}
}