Chapter 4, Exchanging Data Between an External Application
and a Basic XFA Form
XFA Specification
Creating, Updating, and Unloading a Basic XFA Data DOM
114
representation of data. Data expressed in XML can be manipulated via off-the-shelf, and often freely
available, processing tools; in the worst case the data can be manipulated using a common text editor.
Hence, it would be contrary to this inherent property of XML to require that data conform to a specific
grammar or schema before it can be used within an XFA processing application.
XFA Data DOM Basic Concepts
This section introduces basic concepts behind the XFA Data Document Object Model. It introduces the
following concepts:
How data is represented in an XFA data document object model (DOM), how the tree structure of such
a DOM aids data organization, how data within the Data DOM is identified
Relationship between the XFA Data DOM and the XML Data DOM, and how this can simplify your
implementation
Notation used to represent data
About the XFA Data DOM
The interpretation of an XML data document is a mapping operation of the data into an object model
known as the "XFA Data Document Object Model", commonly referred to as the XFA Data DOM. The
behavior of the mapping is governed by rules described by this specification. The software component
responsible for performing the mapping of the XML data document into the XFA Data DOM is referred to
in this specification as the
data loader.
There is in addition a reverse function that maps from the XFA Data
DOM to a new XML data document. The software component responsible for this reverse mapping is
referred to in this specification as the data unloader.
Data loader creating an XFA Data DOM
XML
DOM
XML
User’s XML Data
Data
DOM
The XFA Data DOM provides a set of software interfaces to the data mapped from an XML data document.
In principle, the same 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. The XFA Data DOM provides interfaces
that are simpler than a generic XML Document Object Model [XMLDOM2]. There are fewer interfaces in
the XFA Data DOM as compared to the XML DOM, and many of the physical structures of XML are
abstracted away. Notwithstanding the wider applicability of the XFA Data DOM, this specification assumes
that the XML data document is first loaded into an XML Data DOM and from there into the XFA Data DOM.
The XFA Data DOM encloses a tree structure in which each node is either a
dataValue
object or a
dataGroup
object. In most cases nodes correspond to individual XML elements and are peered with
individual nodes in the XML Data DOM. Parent-child relationships correspond to element nesting
relationships, that is, the element corresponding to the parent of any given node contains the element
corresponding to the given node. In addition the children of any node are ordered by age, that is the first
child acquired by the node is the eldest, the next child acquired is the second-eldest and so on. In XFA
Home Index Bookmark Pages
Pages: Home Index All Pages