Chapter 4, Exchanging Data Between an External Application
and a Basic XFA Form
XFA Specification
Creating, Updating, and Unloading a Basic XFA Data DOM
127
<firstname>John</firstname>
<lastname>Smith</lastname>
</author>
<quantity>2</quantity>
<unitprice>30.00</unitprice>
<discount>.40</discount>
</book>
</item>
<notes>You owe $85.00, please pay up!</notes>
</order>
The result of mapping this XML data document with default mapping rules is as follows:
[dataGroup (order) isRecord="true"]
[dataValue (number) = "1"]
[dataGroup (shipTo)]
[dataGroup (reference)]
[dataValue (customer) = "c001"]
[dataValue (contact) = "Tim Bell"]
[dataGroup (date)]
[dataValue (day)
= "14"]
[dataValue (month) = "11"]
[dataValue (year) = "1998"]
[dataGroup (item)]
[dataGroup (book)]
[dataValue (ISBN) = "15536455"]
[dataValue (title) = "Introduction to XML"]
[dataGroup (author)]
[dataValue (firstname) = "Charles"]
[dataValue (lastname) = "Porter"]
[dataValue (quantity) = "1"]
[dataValue (unitprice) = "25.00"]
[dataValue (discount) = ".40"]
[dataGroup (item)]
[dataGroup (book)]
[dataValue (ISBN) = "15536456"]
[dataValue (title) = "XML Power"]
[dataGroup (author)]
[dataValue (firstname) = "John"]
[dataValue (lastname) = "Smith"]
[dataValue (quantity) = "2"]
[dataValue (unitprice) = "30.00"]
[dataValue (discount) = ".40"]
[dataValue (notes) = "You owe $85.00, please pay up!"]
In the above example the document range is the range of document content enclosed by the
order
data
group element, and by default, is partitioned into a single record represented in bold type.
Data Value Elements
Consider the following XML data document:
<book>
<ISBN>15536455</ISBN>
<title>Introduction to XML</title>
</book>