The FMPXMLRESULT grammar contains additional information about the database that is not in the FMPDSORESULT grammar, such as the number of records, field types, and field formats. These elements and attributes are necessary for the XML to validate properly.
Use the FMPXMLRESULT grammar if you require the METADATA information provided by this grammar. Because FileMaker Pro supports both importing and exporting in the FMPXMLRESULT grammar, this can be a useful format for transferring data between FileMaker Pro files.
Note  The FMPXMLRESULT grammar is not well suited for use with cascading style sheets (CSS). Use the FMPDSORESULT grammar if you want to use CSS with your XML data.
In the FMPXMLRESULT grammar, the DATABASE element contains the NAME, RECORDS, DATEFORMAT, LAYOUT, and TIMEFORMAT attributes.
The DATEFORMAT attribute specifies the format of dates in the XML document.
The TIMEFORMAT attribute specifies the format of times in the XML document.
The METADATA element contains one or more FIELD elements, each containing information for one field/column — including the name of the field as defined in the database, the field type, the Yes or No allowance for empty fields (EMPTYOK attribute), and the maximum number of repeating values (MAXREPEAT attribute). Valid values for field types are TEXT, NUMBER, DATE, TIME, TIMESTAMP, and CONTAINER.
The RESULTSET element contains all of the ROW elements that specify the record data in the XML. Each ROW element contains the field/column data for one row in the result set — including the record ID for the row, the modification ID for the row, and the COL element containing the data for one field/column in the row (where multiple DATA elements represent one of the values in a repeating or portal field).
XML export does not support exporting container field data.
Due to XML limitations, only one record from each related field is exported.
The order of the COL elements corresponds with the order of the FIELD elements in the METADATA element, for example, where the "First Name," "Last Name," and "Department" elements are listed in the METADATA, "Joe," "Smith," and "Engineering" are listed in the same order in the RESULTSET ROW.
For more information, search the FileMaker Knowledge Base available at http://help.filemaker.com.
Before importing the XML, FileMaker Pro uses a Xerces-based XML parser and a Xalan-based XSLT processor to apply an XSLT style sheet (if you specified one) to transform the XML data. If an error message appears, correct the error and try importing again.
Though the XML that you import must conform to the FMPXMLRESULT grammar, certain elements and attributes are not used during import. The following table defines which elements and attributes are used during XML import, and lists the allowed default values for attributes. In most cases, attribute values may be null (such as TIMEFORMAT=""). Also, the FMPXMLRESULT element should always declare the FileMaker namespace for the grammar.
xmlns="http://www.filemaker.com/ fmpxmlresult"
Sample XML data in the FMPXMLRESULT grammar
The following is an example of XML data in the FMPXMLRESULT grammar. For complete details on the document type definition (DTD) for the grammar, see the fmpxmlresult_dtd.htm file, in the Extras folder for your language where the FileMaker Pro application is installed. For example, FileMaker Pro > English Extras > Examples > XML Documentation folder.
<?xml version="1.0" encoding="UTF-8"?>
<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
<PRODUCT BUILD="5/23/2002" NAME="FileMaker Pro"
NAME="Employees.fmp12" RECORDS="23" TIMEFORMAT="hh:mm:ss"/>