com.ibatis.common.xml
Class NodeletParser
public
class
NodeletParser
extends 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.
public void addNodelet(String xpath,
Nodelet nodelet)
Registers a nodelet for the specified XPath. Current XPaths supported
are:
- Text Path - /rootElement/childElement/text()
- Attribute Path - /rootElement/childElement/@theAttribute
- Element Path - /rootElement/childElement/theElement
- All Elements Named - //theElement
public void parse(Reader reader)
Begins parsing from the provided Reader.
public void parse(InputStream inputStream)
public void parse(Node node)
Begins parsing from the provided Node.
public void setEntityResolver(EntityResolver resolver)
public void setValidation(boolean validation)
Copyright © 2011. All Rights Reserved.