Print Page as PDF
M XML EVENT-DRIVEN API ICR (4149)

M XML EVENT-DRIVEN API    ICR (4149)

Name Value
NUMBER 4149
IA # 4149
DATE CREATED 2003/07/03
CUSTODIAL PACKAGE TOOLKIT
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE MXMLPRSE
NAME M XML EVENT-DRIVEN API
GENERAL DESCRIPTION
An event-driven interface that is modeled after the
widely used SAX interface specification.  In this implementation, a client
application provides a special handler for each parsing event of interest.
When the client invokes the parser, it conveys not only the document to be
parsed, but also the entry points for each of its event handlers.  As the
parser progresses through the document, it invokes the client's handlers for
each parsing event for which a handler has been registered.
STATUS Active
ID MXMLPRSE
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT VARIABLES
EN(DOC,CBK,OPT)
VARIABLES TYPE VARIABLES DESCRIPTION
DOC Input
This is either a closed reference to a global root
containing the document or a filename and path reference identifying the
document on the host system.  If a global root is passed, the document must
either be stored in standard FileMan word-processing format or may occur in
sequentially numbered nodes below the root node.  Thus, if the global
reference is "^XYZ", the global must be of one of the following formats:

^XYZ(1,0) = "LINE 1"
^XYZ(2,0) = "LINE 2"

or ^XYZ(1) = "LINE 1"
^XYZ(2) = "LINE 2"  ...
CBK Both
This is a local array, passed by reference, that
contains a list of parse events and the entry points for the handlers of those
events.  The format for each entry is:

CBK(<event type>) = <entry point>

The entry point must reference a valid entry point in an existing M routine
and should be of the format tag^routine.  The entry should not contain any
formal parameter references.  The application developer is responsible for
ensuring that the actual entry point contains the appropriate number of formal
parameters for the event type.  For example, client application might register
its STARTELEMENT event handler as follows:

CBK("STARTELEMENT") = "STELE^CLNT"

The actual entry point in the CLNT routine must include two formal parameters
as in the example:

STELE(ELE,ATR)   <handler code>

See full documentation for event types.  Documentation at:
http://www.va.gov/vdl/VistA_Lib/Infrastructure/Kernel_Toolkit/KTK7_3p58.p df
OPT Input
This is a list of option flags that control parser
behavior.  Recognized option flags are:

W = Do not report warnings to the client.

V = Validate the document.  If not specified, the parser only checks for
conformance.

0 = Terminate parsing on encountering a warning.

1 = Terminate parsing on encountering a validation error.  (By default, the
parser terminates only when a conformance error is encountered.)