|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The XMLInterpreter interface allows an arbitrary class to obtain tokens to interpret at part of a simple language framework. There are three events: shift, reduce, and push. The semantics of the interpreter are described in the documentation for XMLWalker.
No exceptions are thrown as part of the interface, and no consistent way to get errors is provided. The implementor is expected to cache error information locally and provide it with a getError method.
To use this interface, create a DOM with Xerces, using the DocumentBuilderFactory to construct a DocumentBuilder. Use parse to return the new DOM.
Instantiate an object that implements XMLInterpreter, then pass is to XMLWalker.walk(). Use additional methods in the imterpreter class to pass state and error information.
Method Summary | |
void |
push(org.w3c.dom.Node n)
|
void |
reduce(String s)
|
void |
shift(String s,
String v)
|
Method Detail |
public void shift(String s, String v)
public void reduce(String s)
public void push(org.w3c.dom.Node n)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |