In the following example, the row node represents a record within the XML file. The value of
the
attribute is what makes the row unique.
id
<datapacket>
<row id="1" date="01/01/2003" rate="50" hours="5" />
<row id="2" date="02/04/2003" rate="50" hours="8" />
</datapacket>
The XPath to uniquely identify the row node is shown in the following example:
datapacket/row[@id='xxx']
In this example, xxx represents a value for the
the XML file would be bound to the
value would be as follows:
rowNodeKey
datapacket/row[@id='?id']
The question mark symbol (
the name of the field in the data set. At runtime, the XUpdateResolver component substitutes
the value from the
In the next example, the contacts node with a category attribute of Management represents the
record(s) within the XML file, and the
record unique:
<datapacket>
<company id="5" name="ABC tech">
<contacts category="Mgmt">
<contact>
<empId>555</employeeId>
<name>Steve Woo</name>
<email>steve.woo@abctech.com</email>
</contact>
<contact>
<empId>382</employeeId>
<name>John Phillips</name>
<email>john.phillips@abctech.com</email>
</contact>
...
...
</contacts>
<contacts category="Executives">
...
...
</contacts>
...
...
</company>
</datapacket>
The
rowNodeKey
datapacket/company/contacts[@category='Mgmt']/contact[empId='?empId']
296
Chapter 14: Data Integration (Flash Professional Only)
id
identifies that this is a field parameter. The
?)
field of the data set to generate the correct XPath for the specified record.
id
employeeId
value for this XML file would be as follows:
attribute. In a typical case, the
id
field of the DataSet component. Therefore, the
subnode contains the value that makes the
attribute in
id
value specifies
id