|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.tidy.NodeHandlerStore
Provides a method for non-Tidy classes to register external
handlers to extend the core HTML parsing. Provides
NodeHandler
implementations with access to each node as it is parsed and
provides a facility for adding dynamic content.
NodeHandler
,
Node.insertNodeAtEnd(org.w3c.tidy.Node, org.w3c.tidy.Node)
,
StreamInImpl.readCharFromStream()
Method Summary | |
void |
addNewHandler(NodeHandler handler)
Register a new NodeHandler implementation with the NodeHandlerStore. |
int |
getDynamicInput()
Iterates through the registered NodeHandlers, calling the getDynamicContent method
on each, until the list is exhausted or one of the handlers returns
a non -1 value. |
java.util.List |
getHandlers()
Returns the list of registered NodeHandler implementations. |
static NodeHandlerStore |
getInstance()
Singleton accessor method, returns the global instance of the NodeHandlerStore. |
Node |
handleNode(Node element,
Node node)
Submits the element and node to the handleNode method of each NodeHandler implementation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static NodeHandlerStore getInstance()
public void addNewHandler(NodeHandler handler)
handler
- A new NodeHandler implementation to register as active.public java.util.List getHandlers()
public Node handleNode(Node element, Node node)
addNewHandler
.
This call is made from the
Node.insertNodeAtEnd
method, so the
input element and node variables represent the parent element and
the node that is being appended.
element
- Parent element for the new node elementnode
- Node to be inserted into the DOM under the parent element
public int getDynamicInput() throws java.io.IOException
getDynamicContent
method
on each, until the list is exhausted or one of the handlers returns
a non -1 value.
java.io.IOException
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |