XML FMPXMLRESULT grammar
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.
Notes
 •
 •
 
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, which you can download at http://www.filemaker.com/downloads.
<?xml version="1.0" encoding="UTF-8"?>
<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
<ERRORCODE>0</ERRORCODE>
<PRODUCT BUILD="5/23/2002" NAME="FileMaker Pro"
VERSION="7.0"/>
<DATABASE DATEFORMAT="MM/dd/yy" LAYOUT="summary"
NAME="Employees.fmp12" RECORDS="23" TIMEFORMAT="hh:mm:ss"/>
<METADATA>
<FIELD EMPTYOK="NO" MAXREPEAT="1" NAME="First Name" TYPE="TEXT"/>
<FIELD EMPTYOK="NO" MAXREPEAT="1" NAME="Last Name" TYPE="TEXT"/>
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Department" TYPE="TEXT"/>
</METADATA>
<RESULTSET FOUND="2">
<ROW MODID="47" RECORDID="34">
<COL>
<DATA>Joe</DATA>
</COL>
<COL>
<DATA>Smith</DATA>
</COL>
<COL>
<DATA>Engineering</DATA>
</COL>
</ROW>
<ROW MODID="89" RECORDID="78">
<COL>
<DATA>Susan</DATA>
</COL>
<COL>
<DATA>Jones</DATA>
</COL>
<COL>
<DATA>Marketing</DATA>
</COL>
</ROW>
</RESULTSET>
</FMPXMLRESULT>