com.arsdigita.xmlinterp
Interface XMLInterpreter

All Known Implementing Classes:
ProductXMLInterpreter

public interface XMLInterpreter

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.

Since:
CCM Core 5.2
Version:
$Revision: #7 $ $Date: 2004/04/07 $
Author:
Bryan Che (bche@redhat.com)

Method Summary
 void push(org.w3c.dom.Node n)
           
 void reduce(String s)
           
 void shift(String s, String v)
           
 

Method Detail

shift

public void shift(String s,
                  String v)

reduce

public void reduce(String s)

push

public void push(org.w3c.dom.Node n)


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC