Developer’s Guide

Table Of Contents
7-6 Developer’s Guide
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.filemaker.com/fmpxmlresult">
<ERRORCODE>0</ERRORCODE>
<PRODUCT NAME="Web Companion" VERSION="5.5"
BUILD="10/23/99"/>
<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>
<COL>
<DATA>Marketing</DATA>
</COL>
</ROW>
</RESULTSET>
</FMPXMLRESULT>
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 then “Department” elements are
listed in the METADATA, “Joe”, “Smith”, and then “Engineering”
are listed in the same order in the RESULTSET ROW.
Note If the –lay parameter is not specified in the FileMaker Pro CGI
request, the LAYOUT attribute in the DATABASE element is empty
and data for every field in the database is returned. (See “Generating
FileMaker Pro CGI requests for an XML document” on page 7-8 for
information.)