/*  Copyright (c) 2000 by Oracle Corporation. All Rights Reserved. */
package oracle.portal.utils.xml.v1;

import org.w3c.dom.Node;

/** 
 * Objects implementing the <code>NodeHandler</code> interface should be
 * capable of translating an XML DOM object tree into an analogous hierarchy of
 * application objects, in a similar manner to {@link DefaultNodeHandler}. A
 * {@link DefaultNodeHandler} is capable of 'delegating' the processing of
 * parts of its DOM tree to any other object implementing this
 * <code>NodeHandler</code> interface.
 */
public interface NodeHandler 
{
    /**
     * Recursively processes all the children of a given XML node in the
     * context of an application object represented by that node, in order to
     * populate the application object and create and populate other 'child'
     * application objects.
     * @param n current node whose children will be processed to populate the
     * context application object.
     * @param o the context application object.
     * @exception NodeHandlerException if unable to instantiate a child object
     * or handler object, find a method corresponding to a simple element, or
     * an exception occurs while calling a method on a child object.
     */
    public void processNode(Node n, Object o) throws NodeHandlerException;
}
