public void addMetadata(String value) {
        if (name == null || name.isEmpty()) {
            // We didn't find the attribute which holds the name
            return;
        }
        if (value.length() > 0) {
            String previous = metadata.get(name);
            if (previous != null && previous.length() > 0) {
                value = previous + ", " + value;
            }
            metadata.set(name, value);
        }
    }
This adds a Metadata entry for a given node.
The textual content of the node is used as the
value, and the Metadata name is taken from
an attribute, with a prefix if required.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-xml-module/src/main/java/org/apache/tika/parser/xml/AttributeDependantMetadataHandler.java