Attach an adapter by inserting it in the diagram, connecting it to a
      stream or window, and setting properties.
         This example shows you how to insert an adapter, enable it for schema discovery, then
            generate and attach the input window and its schema automatically. This is the best
            practice for creating a schema when using an adapter that supports schema discovery.
         Alternatively, ESP Studio allows you to create the stream or window and then attach an
            adapter. Use this method for adapters that do not support schema discovery, or where you
            want to explicitly create an inline schema for input streams or windows.
         
       
- Open the Input Adapters compartment in the Palette (to
               the right of the diagram) and locate the adapter you want.
 For this example, choose the 
                  File XML Input adapter, which reads data from an XML
               file. 
 
- Click the adapter in the Palette, then click in the diagram.
 Do not try to drag-and-drop from the Palette into the diagram.
 The adapter shape is inserted but its border is red,
               indicating it is not complete, until you define its properties and attach it to a
               stream or window.
 
- In the adapter shape toolbar, click Edit Properties
                  (
)
               . 
- (Optional) In the Adapter Properties dialog, change
                  Name to identify your adapter.
 
- Configure the adapter for schema discovery:
 Required properties are in red. 
Note: Leave Use named property
                     set unchecked, as this option does not allow you to discover the
                  schema for this adapter.
- Click in the Value column for Directory and click the Browse button (
). 
-  Click the Browse button in the Directory dialog to select
                     the folder with the data files you want the adapter to read. Click OK. 
 For this example, specify the absolute path to the sample
                     data installed with the product. 
| Property | 
Value | 
| Directory | 
                               workspace_install_path\exampledata
                               
                              Windows default: C:\Documents and Settings\username\My
                                    Documents\SybaseESP\5.1\workspace\exampledata 
                              Linux and Solaris default: your_home_directory/SybaseESP/5.1/workspace/exampledata 
                            | 
 
                     Note: The file property is set automatically in the next task, when you select
                        a file for schema discovery. 
                    
 
- Click
               OK,
               then press Ctrl+S to save. 
 
Next
Import the schema and create a connected input stream or window with the same schema as the data file.