The SOLA DOM API
The Document Object Model (DOM) is a specification designed by the World-
Wide-Web Consortium (W3C) to provide an object oriented and vendor
independent way to inquire on and modify XML documents. DOM works by
loading the entire XML document into memory and then converting the
document into a tree structure. Inquiring on, modifying and creating a new
XML document is done using methods provided by the DOM specification.
SOLA provides the SOLA DOM API to inquire on, modify and create XML
documents. The SOLA DOM API is a “DOM like” API that implements the
functionality of DOM in a format that is easily used by procedural languages
like COBOL. The SOLA DOM API can be used by CICS transactions and batch
jobs. It provides functions to inquire on an XML document repeatedly in any
direction and modify an existing document. The API also provides methods to
create new XML documents. This document lists all the features of the SOLA
DOM API and provides many samples for use in mainframe programs running
in CICS and batch.
In most cases, the SOLA DOM API is identical for CICS and batch programs.
In those instances where the APIs differ, the differences will be noted in the
text.
Advantages
The SOLA DOM API provides an easy and efficient way for any mainframe
program to process XML documents. Performance (CPU utilization and
memory consumption) was a major focus in the design and development of
the SOLA DOM API. To keep CPU consumption to a minimum, the SOLA DOM
API is highly optimized and is written entirely in Assembler for z/OS. The
SOLA DOM API has a relatively small memory footprint for the DOM tree due
to the fact that it parses the XML document and normalizes it in place without
requiring any additional memory to hold the node values. The DOM tree
contains pointers to the parsed and normalized document, thereby holding the
memory footprint to a minimum.
The SOLA DOM API makes it easy for the mainframe programmer to produce
well-formed XML without the need to perform complex string manipulations.
Without the SOLA DOM API, the programmer would have to follow the XML