Custom Format : .xml
Extensible Markup Language (XML) is a well supported open standard. RESTfm produces a minimal XML format that is easy to parse.
Example URI and response
http://demo.restfm.com/RESTfm/postcodes/layout/brief%20postcodes.xml?RFMmax=2
<?xml version="1.0" encoding="UTF-8"?> <resource xmlns="http://www.restfm.com"> <meta> <row> <field name="recordID">10096980</field> <field name="href">/RESTfm/postcodes/layout/brief%20postcodes/10096980.xml</field> </row> <row> <field name="recordID">10096981</field> <field name="href">/RESTfm/postcodes/layout/brief%20postcodes/10096981.xml</field> </row> </meta> <data> <row> <field name="Pcode">0810</field> <field name="Locality">BRINKIN</field> <field name="State">NT</field> <field name="Comments"></field> </row> <row> <field name="Pcode">0810</field> <field name="Locality">CASUARINA</field> <field name="State">NT</field> <field name="Comments"></field> </row> </data> <info> <field name="tableRecordCount">16634</field> <field name="foundSetCount">16634</field> <field name="fetchCount">2</field> <field name="skip">0</field> <field name="X-RESTfm-Version">3.0.0beta/r430</field> <field name="X-RESTfm-Protocol">4</field> <field name="X-RESTfm-Status">200</field> <field name="X-RESTfm-Reason">OK</field> <field name="X-RESTfm-Method">GET</field> </info> <nav> <row> <field name="name">start</field> <field name="href">/RESTfm/postcodes/layout/brief%20postcodes.xml?RFMmax=2</field> </row> <row> <field name="name">next</field> <field name="href">/RESTfm/postcodes/layout/brief%20postcodes.xml?RFMmax=2&RFMskip=2</field> </row> <row> <field name="name">end</field> <field name="href">/RESTfm/postcodes/layout/brief%20postcodes.xml?RFMmax=2&RFMskip=end</field> </row> </nav> <metaField> <row> <field name="name">Pcode</field> <field name="autoEntered">0</field> <field name="global">0</field> <field name="maxRepeat">1</field> <field name="resultType">text</field> </row> <row> <field name="name">Locality</field> <field name="autoEntered">0</field> <field name="global">0</field> <field name="maxRepeat">1</field> <field name="resultType">text</field> </row> <row> <field name="name">State</field> <field name="autoEntered">0</field> <field name="global">0</field> <field name="maxRepeat">1</field> <field name="resultType">text</field> </row> <row> <field name="name">Comments</field> <field name="autoEntered">0</field> <field name="global">0</field> <field name="maxRepeat">1</field> <field name="resultType">text</field> </row> </metaField> </resource>
Example XML format GET response.
Changelog
Version |
Description |
---|---|
< 3.0.0 | Prior to version 3 'recordID' and 'href' metadata were attributes to each 'row' entity in the 'data' section. This was inconsistent with the other formats and has been deprecated in favour of keeping metadata in the 'meta' section. |