|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CREATE XML for Interoperability and Data Exchange with Other Applications The need to generate XML data from a variety of data sources is becoming increasingly important to a wide variety of data processing environments. Interoperability and data exchange between mainframe systems and other systems running on a variety of hardware and software platforms is essential. XML—EXtensible Markup Language—is a way to generically describe data to facilitate interchange of data between applications. Our support for XML output is important for intranet-style applications and for distributing data within organizations that have systems running on different platforms or written in different languages, as well as for business-to-business (B2B) processing. The CREATE XML feature allows creation of valid XML documents in XML formats specified by the developer using mainframe data described by a 4GL schema. The XML output can be retained on the mainframe or transmitted to other platforms, where it can be used directly by a client process or transformed to a format usable by other systems. CREATE XML produces well-defined, self-contained, and understandable XML output that can be used by Java, Visual Basic, and other XML-enabled processes. CREATE XML is a robust facility that combines XML support with the powerful
data retrieval and data manipulation capabilities of the CREATE command. It is a
marriage of full support of XML with CREATE functionality.
Generating XML data can be as simple as adding the XML
keyword to an existing CREATE request. In cases where XML data must be produced
to meet specific application needs, CREATE XML allows generation of a variety of
complex XML structures.
This is the XML document file that is generated:
The file includes default XML tags, like <node>,
that indicate data structure, as well as custom XML tags, like <StoreName>,
provided through the database metadata (schema). Generally, the CREATE XML command produces XML
documents structured in one of two ways—flat and hierarchical. The following
sections show simple examples of each type of document. The following examples
show some simple XML document files produced by CREATE to show the difference
between flat and hierarchical XML data.In some cases, an XML document may be a
combination of hierarchical and flat structures. A flat XML document is very simplistic and is
comparable to an external flat file, such as a QSAM file. It has a very simple
XML structure. <row> tags enclose each data record. A flat XML document is
geared for data import into products like spreadsheets or SQL tables, which do
not have hierarchical structure. Flat XML documents are generic and suitable for
use in a variety of products without the need to provide specific metadata to
accompany the file.
A Hierarchical XML Document By default CREATE XML produces a hierarchical XML
document file. The intent of hierarchical XML is to preserve the data
relationships produced by the CREATE request. A sort key represents a parent
value, and the objects being sorted represent children of the parent key. A
<node> tag indicates a break in the hierarchical structure. <node>
tags are generated for sort breaks caused by BY items (sort keys) used in the
request. Each set of records within a sort break is enclosed by an opening
<node> tag and a closing </node> tag. Also, immediately after each
sort value, <node> tags enclose each separate child record associated that
sort value.
To find out more about how Select Business Solutions can help you either Contact Us, or visit our Product Resources area for all the latest related downloads. |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||