protected static <T> T buildSingle(String itemName, Class<T> itemClass, InputStream is)
            throws TikaConfigException, IOException {
        Element properties = null;
        try {
            properties = XMLReaderUtils.buildDOM(is).getDocumentElement();
        } catch (SAXException e) {
            throw new IOException(e);
        } catch (TikaException e) {
            throw new TikaConfigException("problem loading xml to dom", e);
        }
        if (!properties.getLocalName().equals("properties")) {
            throw new TikaConfigException("expect properties as root node");
        }
        return buildSingle(itemName, itemClass, properties, null);
    }
Use this to build a single class, where the user specifies the instance class, e.g.
PipesIterator

@param itemName
@param is
@throws TikaConfigException
@throws IOException
tika-core/src/main/java/org/apache/tika/config/ConfigBase.java