GXPARSE hosted by SourceForge.net Logo

Interface EntityListener<T extends Parser>

All Known Subinterfaces:
All Known Implementing Classes:
AbstractErrorListener, AbstractListener, CoroutineCheckListener, DumpListener, SkipListener

public interface EntityListener<T extends Parser>

Listener interface for XML entity notification.

Method Summary
 void doEntity(T parser, CurrentEntity entity)
           Process an entity, including the entity content.

Method Detail


void doEntity(T parser,
              CurrentEntity entity)
              throws ListenerException,

Process an entity, including the entity content. Parameter entities have '%' prepended to their names, general entities do not.

This method is entered at the beginning of the entity, when the actual data is not yet available. The content is processed when the method calls back (via ParseContent) to the parser. Upon return from the callback, all of the entity has been processed by other Listener methods. For additional information about this method, see the ElementListener.doElement method, which operates in a very similar way.

The primary use of this method is to give special handling to some entities, which will be recognized by the name.

parser - The Parser that invoked this method
entity - CurrentEntity instance with a content handler to parse the centent of the entity.
ListenerRuntimeException - if this method does not invoke the content handler exactly once before returning.

GXPARSE download

GXPARSE Generic XML Stream Parser API and supporting tools.   Release $Name: gxparse-sf-alpha-2_0 $
Copyright 2003-2004 Ian E. Gorman
Released under GNU Lesser General Public License