com.ibatis.common.xml
Class NodeletParser

java.lang.Object
  extended bycom.ibatis.common.xml.NodeletParser

public class NodeletParser
extends java.lang.Object

The NodeletParser is a callback based parser similar to SAX. The big difference is that rather than having a single callback for all nodes, the NodeletParser has a number of callbacks mapped to various nodes. The callback is called a Nodelet and it is registered with the NodeletParser against a specific XPath.


Constructor Summary
NodeletParser()
           
 
Method Summary
 void addNodelet(java.lang.String xpath, Nodelet nodelet)
          Registers a nodelet for the specified XPath.
 void parse(org.w3c.dom.Node node)
          Begins parsing from the provided Node.
 void parse(java.io.Reader reader)
          Begins parsing from the provided Reader.
 void setEntityResolver(org.xml.sax.EntityResolver resolver)
           
 void setValidation(boolean validation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeletParser

public NodeletParser()
Method Detail

addNodelet

public void addNodelet(java.lang.String xpath,
                       Nodelet nodelet)
Registers a nodelet for the specified XPath. Current XPaths supported are:


parse

public void parse(java.io.Reader reader)
           throws NodeletException
Begins parsing from the provided Reader.

Throws:
NodeletException

parse

public void parse(org.w3c.dom.Node node)
Begins parsing from the provided Node.


setValidation

public void setValidation(boolean validation)

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver resolver)