• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 17. Exchanging Data > Exchanging Data Using XML

Exchanging Data Using XML

With FileMaker 6 you can use XML in several ways. You can import XML-based data into an existing FileMaker file or you can convert XML data into a new FileMaker file. You also can export a FileMaker database in an XML format that other XML-aware applications can then read.

To import XML data into an existing FileMaker database:

1.
Open the FileMaker database into which you want to import data ( in Windows/ on the Mac). If you’ll be replacing particular records, use FileMaker’s Find, Omit, and Sort commands to expand or narrow the Found Set to only the records you’ll be replacing.

2.
Choose File > Import Records > XML Source (Figure 17.4).

Figure 17.4. To import XML data into FileMaker, choose File > Import Records > XML Source.


3.
When the Specify XML and XSL Options dialog box appears, you have the option of locating your data source and style sheet in a local File or on a Web server with an HTTP request. In this example, choose the top File radio button (Figure 17.5), which will automatically activate the Open dialog box.

Figure 17.5. When the Specify XML and XSL Options dialog box appears, choose the top File radio button.


4.
When the Open dialog box appears, navigate to the folder where the XML source file is stored, select it, and click Open. In this example, navigate to the file msdso_attrib.xml inside these folders: FileMaker\FileMaker Pro 6\Examples\XML Examples\Import\ATTRIB_MSDSO\ (on Macs the path is FileMaker Pro 6\FileMaker Examples\XML Examples\Import\ATTRIB_MSDSO\) (Figure 17.6).

Figure 17.6. Once you navigate to the folder where the XML source file is stored, select it, and click Open.


5.
When the Specify XML and XSL Options dialog box reappears, the file chosen in step 4 will be listed next to the top Specify button. Now choose the Use XSL style sheet checkbox and choose the second File radio button (Figure 17.7), which will automatically activate the Open dialog box.

Figure 17.7. When the Specify XML and XSL Options dialog box reappears, choose the Use XSL style sheet checkbox and choose the second File radio button.


6.
Navigate to the folder where the XSL file is stored, select it, and click Open. In this example, navigate to the file msdso_attrib.xsl, which is stored in the same folder listed in step 4 (Figure 17.8).

Figure 17.8. Navigate to the folder where the XSL file is stored, select it, and click Open.


7.
When the Specify XML and XSL Options dialog box reappears, both the XML and XSL files will be listed next to their respective Specify buttons. Click OK (Figure 17.9).

Figure 17.9. Once you’ve selected the XML file and XSL style sheet, click OK.


8.
When the Import Field Mapping dialog box appears, check to see if the data listed in the left-side window matches up with the field names on the right side (Figure 17.10). If not, click the View by pop-up menu and choose matching names or click the name of the mismatched field and drag it up or down to match up with the correct left-side data. Use the Scan Data << and >> buttons to double-check the data-field matchups. (Also see the first Tip.)

Figure 17.10. Before clicking Import, make sure the left-side data in the Import Field Mapping dialog box matches up with the right-side field names.


9.
To activate individual field imports, click the center column to turn the slashed zero into a single-headed arrow to import data or a double-headed arrow to match fields. For details, see Table 7.2 on page 87.

10.
Once you’ve tweaked the source-to-database mapping to your satisfaction, click Import. If you’re importing into an existing FileMaker database, the new records will appear in Browse mode (Figure 17.11).

Figure 17.11. If you’re importing into an existing FileMaker database, the new records will appear in Browse mode.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint