Progress
External Program
Interfaces


XML and Progress

The Document Object Model (DOM) is an application programming interface (API) for XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated. In the DOM specification, the term document is used in the broad sense to include many different kinds of information that might be stored in diverse systems. When you read an XML document via the DOM API, the DOM parser reads and parses the complete input document before making it available to the application.

Progress has defined an initial set of extensions to the Progress 4GL to allow the use of XML through the DOM interface. These extensions provide 4GL applications with the basic input, output, and low-level data manipulation capabilities required to use data contained in XML documents. They are not intended to provide access to the entire DOM interface, nor are they intended to include all the high-level constructs.

Note On DOM Compatibility With the 4GL

The DOM API is designed to be compatible with a wide range of programming languages, but the naming convention chosen by the World Wide Web Consortium (W3C) does not match what already exists in the Progress 4GL. In some cases, PSC elected to use the familiar names already used in the 4GL rather than the names given in the DOM specification. Similarly, where there are existing 4GL features that provide the same capability as the DOM interfaces, PSC has chosen to use the 4GL implementation rather than introduce new language features that match the DOM more closely.

Accessing XML With the Progress 4GL

The DOM presents documents as a hierarchy or tree of node objects that also implement other, more specialized interfaces. Progress implements the node interface as a Progress object. The document interface also inherits from the node interface. Progress has extended it to provide special methods.

This gives us two new object types in the 4GL for XML document manipulation:

NOTE: Progress also supports the Simple API for XML (SAX) interface to XML. For more information, see "Simple API For XML (SAX)," in this book.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095