    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Interface xm.xm_ParseListener

public interface xm_ParseListener

Listener interface for the notification of events which occur during the processing of an XML source. Its main purpose is to facilitate observation of the progress of the parse (eg. by displaying it in a progress bar), rather than for the triggering of serious processing (which is what SAX does); any such processing should be done by the xg-derived nodes which are created in any case.

It is similar in certain respects to the SAX DocumentHandler interface, although it is invoked at a somewhat different level in the parse process. SAX is a low-level parse driver and invokes DocumentHandler when content needs to be process, whereas xm_ParseListener is invoked after the fact, assuming that xm has handled all the main processing.

References to SAX relate to the 12Jan98 version of the SAX specification.

##

endNode(xg_Node, int)
  The end of a node has been parsed.
endParseSuccessful()
  The parse has completed successfully.
endParseUnsuccessful()
  The parse has completed, but not successfully.
startNode(xg_Node, int)
  The start of a node has been parsed.

##

startNode

     public abstract void startNode(xg_Node InputNewNode,
                                    int InputStartPosition)

  The start of a node has been parsed. startNode() can be equated to a higher-level version of the SAX method startElement().

  Parameters:
    InputNode - The node whose start has just been parsed
    InputStartPosition - The offset from the start of the source at which this node starts

endNode

     public abstract void endNode(xg_Node InputNewNode,
                                  int InputEndPosition)

  The end of a node has been parsed. EndNode can be equated to a rich version of the SAX method endElement().

  Parameters:
    InputNewNode - The node which has just been parsed
    InputEndPosition - The offset from the start of the source at which this node ends

endParseSuccessful

     public abstract void endParseSuccessful()

  The parse has completed successfully. EndParseSuccessful can be equated to the SAX method endDocument().

endParseUnsuccessful

     public abstract void endParseUnsuccessful()

  The parse has completed, but not successfully.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index