MACROMEDIA FLASH 8-USING FLASH Use Manual page 416

Using flash
Table of Contents

Advertisement

Connecting to XML data with the XMLConnector
component (Flash Professional only)
The XMLConnector component lets you access any external data source that returns or
receives XML through HTTP. A single instance of an XMLConnector component can be
used to make multiple calls to the same operation. To call more than one operation, use a
different instance of an XMLConnector component for each operation. For example, you
would use one instance to connect to a DataSet component and another instance to connect
to a resolver component, as shown in the illustration in the overview at the beginning of
this chapter.
To use the XMLConnector component, you load a sample of your XML document's schema
into the component. The schema is the structure of the XML document that identifies the
data elements in the document to which you can bind.
To load the schema, you import a sample of the XML data to which you're connecting. You
can either use an actual sample of real data or, if you know XML scripting, create a sample
yourself. You import that sample XML file using the Component inspector.
Be sure that the sample you use contains all the elements you want for data binding and
accurately represents the real data. Different XML structures result in different schemas. For
example, if your sample contains an array with only one item, Flash won't know that you need
an index for that array. The array needs to contain at least two items.
To import a sample schema:
1.
Locate the XML file to use as a sample.
2.
Drag an XMLConnector component to the Stage.
3.
Click the Parameters tab in the Component inspector and for the URL parameter, specify
the fully qualified name of the XML data source.
4.
Click the Schema tab in the Component inspector and select
appropriate. Select
call to the data source.
5.
Do one of the following to import the schema:
Click the Import Sample Schema button in the upper right corner of the Schema tab.
Click the options menu control in the upper right corner of the Component inspector
and select Import XML Schema from the menu.
416
Data Integration (Flash Professional Only)
if the XML sample represents the schema of the results of a
results
or
, as
params
results

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents