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
attribute_predefined_reference
attribute_character_reference
end_of_element
start_of_CDATA_section
end_of_CDATA_section
content_characters
content_predefined_reference
content_character_reference
processing_instruction
comment
unknown_attribute_reference
unknown_content_reference
start_of_prefix_mapping
end_of_prefix_mapping
exception
Parameters to the event functions

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

All these ENTRYs must use the OPTLINK linkage.

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

Figure 88. 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>'
   || 'junk';

In the order of their appearance in this structure, the parser may recognize the following events:


Terms of use | Feedback

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