Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Programming Guide

The SAX event structure

start_of_document
version_information
encoding_declaration
standalone_declaration
document_type_declaration
end_of_document
start_of_element
attribute_name
attribute_characters
end_of_element
start_of_CDATA_section
end_of_CDATA_section
content_characters
processing_instruction
comment
namespace_declare
end_of_input
unresolved_reference
exception
Parameters to the event functions
Differences in the events

The event structure is a structure consisting of 19 LIMITED ENTRY variables which point to functions that the parser will invoke for various "events".

All of these ENTRYs must use the OPTLINK linkage.

All of these ENTRYs will have a first (and sometimes the only) parameter: the user token passed by the program to PLISAXC.

The descriptions below of these 19 events will refer to the example of an XML document in Figure 94. In these descriptions, the term "XML text" refers to the string based on the pointer and length passed to the event.

Figure 94. Sample XML document
   xmlDocument =
      '<?xml version="1.0" standalone="yes"?>'
   || '<!--This document is just an example-->'
   || '<sandwich>'
   || '<bread type="baker&quot;s best"/>'
   || '<?spread please use real mayonnaise ?>'
   || '<meat>Ham &amp; turkey</meat>'
   || '<filling>Cheese, lettuce, tomato, etc.</filling>'
   || '<![CDATA[We should add a <relish> element in future!]]>'
   || '</sandwich>';

Depending on the contents of the XML documents, the parser may recognize the following events:


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)