4
Exchanging Data Between an External Application
and a Basic XFA Form
This chapter explains the basic steps involved with exchanging data between an external application and
an XFA processing application hosting an XFA form.
This chapter assumes the format of the data provided by the external application is compatible with the
XFA default data loading rules.
“Dealing with Data in Different XML Formats” on page 362
translate data into a representation that is compatible with the XFA default data loading.
This chapter contains the following sections:
●
“Creating, Updating, and Unloading a Basic XFA Data DOM”
where data in the XML Data DOM is placed in an XFA Data DOM, how the XML Data DOM is updated
when data in the XFA Data DOM changes, and how data in the XML Data DOM is unloaded.
“Localization and Canonicalization”
of an XFA Data DOM or Form DOM.
“Basic Data Binding to Produce the XFA Form DOM”
explains how containers in the Form DOM are
bound with data in the XFA Data DOM.
●
●
Creating, Updating, and Unloading a Basic XFA Data DOM
This section explains how generic well-formed XML documents are processed by XFA processing
applications and how they present an object and processing model for interpreting and manipulating the
structured data contained within the XML document. This section refers to such XML documents as
XML
data documents.
Background and Goals
The reader of this specification will learn how XML data documents are handled by XFA processing
applications, how the data is mapped to an object model known as the XFA Data DOM, and how the data
is mapped back out again during the creation of a new XML data document. This information is valuable to
authors of form templates who will be processing existing XML data, and to people or systems producing
data that will be serviced by XFA processing applications.
This section primarily focuses on the processing of XML data documents; however, it was a design goal
that the same object model could also be used to represent data from non-XML sources such as a
database or other data formats such as comma-separated values. For this reason the XFA Data DOM does
not interact directly with XML but instead goes through an XML Data DOM. Custom processors can replace
the XML Data DOM with a DOM appropriate for their non-XML data formats.
It should be noted that the concepts and guidelines presented by this specification are also valuable to
other types of XML processing applications outside the realm of XFA, such as applications concerned with
utilizing XML for data exchange and mapping the data into structured documents types other than forms.
A reduction in implementation costs and a gain in flexibility can be obtained by taking a simplified view of
how XML expresses data. The object model described by this specification represents such a simplified
view.
An important philosophy underlying this specification is to place as few requirements as possible on the
data. One of the strengths of XML is that it provides a comprehensible, and often self-evident
113