Developer’s Guide

Table Of Contents
10-6 Developer’s Guide
The METADATA element of the FMPXMLRESULT grammar
contains one or more FIELD elements, each containing information
for one of the fields/columns of the result set—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, and
CONTAINER.
The RESULTSET element of the FMPXMLRESULT grammar
contains all of the ROW elements returned as the result of a query
and an attribute for the total number of records found. 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).
Note The content of container fields in the database will be
generated in the form of the relative URL used for retrieving the
content, instead of the actual content (such as an image).
To qualify the XML elements for the FileMaker Pro application, the
names of all elements and attributes in this grammar are associated
with the unique XML namespace http://www.filemaker.com/
fmpxmlresult. This namespace is declared in the grammar as the
default namespace.
The following is an example of XML data generated with the
FMPXMLRESULT grammar.
Example of XML data in the FMPXMLRESULT grammar
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="yourstylesheet.xsl"?>
<FMPXMLRESULT xmlns="http://www.lemaker.com/fmpxmlresult">
<ERRORCODE>0</ERRORCODE>
<PRODUCT NAME="Web Companion" VERSION="6v1"
BUILD="01/24/02"/>
<DATABASE NAME="Employees.fp5" RECORDS="23"
DATEFORMAT="MM/dd/yy" TIMEFORMAT="hh:mm:ss"
LAYOUT="summary"/>
<METADATA>
<FIELD NAME="First Name" TYPE="TEXT"
EMPTYOK="NO" MAXREPEAT=”1”/>
<FIELD NAME="Last Name" TYPE="TEXT"
EMPTYOK="NO" MAXREPEAT=”1”/>
<FIELD NAME="Department" TYPE="TEXT"
EMPTYOK="YES" MAXREPEAT=”1”/>
</METADATA>
<RESULTSET FOUND="5">
<ROW RECORDID=”34” MODID=”47”>
<COL>
<DATA>Joe</DATA>
</COL>
<COL>
<DATA>Smith</DATA>
</COL>
<COL>
<DATA>Engineering</DATA>
</COL>
</ROW>
<ROW RECORDID=”78” MODID=”89”>
<COL>
<DATA>Susan</DATA>
</COL>
<COL>
<DATA>Jones</DATA>
</COL>