KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ibatis > common > xml > Nodelet


1 package com.ibatis.common.xml;
2
3 import org.w3c.dom.Node JavaDoc;
4
5 /**
6  * A nodelet is a sort of callback or event handler that can be registered
7  * to handle an XPath event registered with the NodeParser.
8  */

9 public interface Nodelet {
10     
11     /**
12      * For a registered XPath, the NodeletParser will call the Nodelet's
13      * process method for processing.
14      *
15      * @param node The node represents any XML node that can be registered under
16      * an XPath supported by the NodeletParser. Possible nodes are:
17      * <ul>
18      * <li>Text - Use node.getNodeValue() for the text value.
19      * <li>Attribute - Use node.getNodeValue() for the attribute value.
20      * <li>Element - This is the most flexible type. You can get the node
21      * content and iterate over the node's child nodes if neccessary. This is
22      * useful where a single XPath registration cannot describe the complex
23      * structure for a given XML stanza.
24      * </ul>
25      *
26      */

27     void process (Node JavaDoc node) throws Exception JavaDoc;
28     
29 }
30
Popular Tags