private IIOMetadataNode getNode(
            IIOMetadataNode rootNode,
            String nodeName) {
        int nNodes = rootNode.getLength();
        for (int i = 0; i < nNodes; i++) {
            if (rootNode.item(i).getNodeName().compareToIgnoreCase(nodeName)
                    == 0) {
                return ((IIOMetadataNode) rootNode.item(i));
            }
        }
        IIOMetadataNode node = new IIOMetadataNode(nodeName);
        rootNode.appendChild(node);
        return (node);
    }
Returns an existing child node, or creates and returns a new child node (if
the requested node does not exist).

@param rootNode the <tt>IIOMetadataNode</tt> to search for the child node.
@param nodeName the name of the child node.
@return the child node, if found or a new node created with the given name.
src/main/java/com/kodedu/animation/GifSequenceWriter.java