Common workflow for the XMLConnector component

The following procedure outlines the typical workflow for the XMLConnector component.

To use an XMLConnector component:

  1. Confirm that your Publish Settings specify ActionScript 2.0.
  2. Add an instance of the XMLConnector component to your application and give it an instance name.
  3. Use the Parameters tab of the Component inspector to enter the URL for the external XML data source that you want to access.
  4. Use the Schema tab of the Component inspector to specify a schema for the XML document.

    NOTE

    You can use the Import Sample Schema button to automate this process.

  5. Use the Bindings tab of the Component inspector to bind data elements (params and results) from the XML document to properties of the visual components in your application.

    For example, you can connect to an XML document that provides weather data and bind the Location and Temperature data elements to label components in your application. The name and temperature of a specified city appears in the application at runtime.

  6. Add a trigger to initiate the data binding operation by using one of the following methods:
    • Attach the Trigger Data Source behavior to a button.
    • Add your own ActionScript to call the trigger() method on the XMLConnector component.
    • Create a binding between an XML parameter and a UI control and set its Kind property to AutoTrigger.

For a step-by-step example that connects and displays XML using the XMLConnector component, see "Data Integration: Using XML for a Timesheet".