Skip to Content

Does isCOBOL support C$XML or other XML interfaces?

Estimated Reading Time: 2 Minutes

Question:

My application calls the ACUCOBOL-GT library routine named C$XML. It is supported? What are other ways to handle XML?

Answer:

Though isCOBOL supports XML streams natively in several powerful methods, it also supports C$XML specifically for ACUCOBOL-GT compatibility. This document will discuss each of these options

C$XML
C$XML support was added in isCOBOL version 2015 Release 1, and enhanced with more op-codes in 2016 Release 1.
There are just a few op-codes that we don't support yet, but will consider supporting as our customers express a need for them.

isCOBOL XML Handling options
isCOBOL provides an internal object named com.iscobol.rts.XMLStream.
This object can be used by a COBOL program read and write XML files and streams easily.
XMLStream is documented in the isCOBOL Language Reference Guide.
Example code is provided in the sample directory installed with isCOBOL (sample/issamples/s-objects/xml.cbl).
You can view the source and execute the sample program by running "isCOBOL samples" from the Start Menu and clicking on the Objects tab.

isCOBOL also supports the XML PARSE and XML GENERATE procedure division statements. For more information, see the KB article What are all of the options for a COBOL program to read and write XML files? and the isCOBOL language reference manual.

Java XML Support
You can also use the Java language XML APIs and tools available to a Java programmer. See https://www.oracle.com/java/technologies/ and search for XML.

For example, to parse local XML files or XML from a URL, a COBOL program can use a Java package named JDOM (http://www.jdom.org).
The sample program attached uses JDOM to parse an xml file from a URL.

Here are some other examples of extensions to the Java Platform to help the Java developer when building XML-based applications:

  • Java API for XML Processing (JAXP)
  • Java API for XML/Java Binding (JAXB)
  • Long Term JavaBeans Persistence
  • Java API for XML Messaging (JAXM)
  • Java API for XML RPC (JAX RPC)
  • Java API for XML Registry (JAXR)
The technologies that JAXP directly or indirectly provides to the Java developer, or technologies that rely on it in order to process XML documents, are among others:
  • SAX, the Simple API for XML
  • DOM, the Document Object Model API from W3C
  • XSLT, the XML Style Sheet Language Transformations from W3C
  • XPath, the XML Path Language from W3C
  • JDOM, the "Java optimized" document object model API from jdom.org
Read more about JAXP at https://www.oracle.com/java/technologies/jaxp-introduction.html
Does isCOBOL support C$XML or other XML interfaces?
  • Attached Files
  • jdom.zip (138.4 KB) 13