private static List<Element> getTopLevelElementChildren(Element element, String parentName,
                                                            String childrenName)
            throws TikaException {
        Node parentNode = null;
        if (parentName != null) {
            // Should be only zero or one <parsers> / <detectors> etc tag
            NodeList nodes = element.getElementsByTagName(parentName);
            if (nodes.getLength() > 1) {
                throw new TikaException(
                        "Properties may not contain multiple " + parentName + " entries");
            } else if (nodes.getLength() == 1) {
                parentNode = nodes.item(0);
            }
        } else {
            // All children directly on the master element
            parentNode = element;
        }

        if (parentNode != null) {
            // Find only the direct child parser/detector objects
            NodeList nodes = parentNode.getChildNodes();
            List<Element> elements = new ArrayList<>();
            for (int i = 0; i < nodes.getLength(); i++) {
                Node node = nodes.item(i);
                if (node instanceof Element) {
                    Element nodeE = (Element) node;
                    if (childrenName.equals(nodeE.getTagName())) {
                        elements.add(nodeE);
                    }
                }
            }
            return elements;
        } else {
            // No elements of this type
            return Collections.emptyList();
        }
    }
Provides a default configuration (TikaConfig).  Currently creates a
new instance each time it's called; we may be able to have it
return a shared instance once it is completely immutable.

@return default configuration
tika-core/src/main/java/org/apache/tika/config/TikaConfig.java