Documentation

Extensible Markup Language (XML)

XML is often used to transfer data between clients in a format that can be read by each. XML is similar to HTML in structure, but it must be well-formed (all open tags must be closed in the reverse order they are created). XHTML is a more strict version of HTML that can be used for web page display. The Lifemapper website is written using XHTML.

Example

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/css/services.xsl?r=20120626"?>
<lm:response xmlns:lm="http://lifemapper.org"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://lifemapper.org
                                 /schemas/serviceResponse.xsd">
   <lm:title>Dasyatis bennetti</lm:title>
   <lm:user>lm2</lm:user>
   <lm:interfaces>
      <lm:atom>/services/sdm/occurrences/987159/atom</lm:atom>
      <lm:csv>/services/sdm/occurrences/987159/csv</lm:csv>
      <lm:eml>/services/sdm/occurrences/987159/eml</lm:eml>
      <lm:json>/services/sdm/occurrences/987159/json</lm:json>
      <lm:kml>/services/sdm/occurrences/987159/kml</lm:kml>
      <lm:pml>/services/sdm/occurrences/987159/pml</lm:pml>
      <lm:shapefile>/services/sdm/occurrences/987159/shapefile</lm:shapefile>
      <lm:xml>/services/sdm/occurrences/987159/xml</lm:xml>
   </lm:interfaces>
   <lm:occurrence>
      <lm:LMModuleType>
         sdm
      </lm:LMModuleType>
      <lm:RESTServiceType>
         occurrences
      </lm:RESTServiceType>
      <lm:SRS>
         epsg:4326
      </lm:SRS>
      <lm:bbox>
         (-49.299999999999997, 2.5666699999999998, 121.93000000000001, 24.949999999999999)
      </lm:bbox>
      <lm:count>
         10
      </lm:count>
      <lm:dataFormat>
         ESRI Shapefile
      </lm:dataFormat>
      <lm:displayName>
         Dasyatis bennetti
      </lm:displayName>
      <lm:epsgcode>
         4326
      </lm:epsgcode>
      <lm:featureCount>
         10
      </lm:featureCount>
      <lm:feature>
         <lm:feature occkey="218764803" nmkey="3227249" canname="Dasyatis bennetti" provkey="283" url="http://data.gbif.org/ws/rest/occurrence/get/218764803" geomwkt="POINT (121.930000000000007 24.949999999999999)" colldate="51879.0" lon="121.93" collcode="ASIZP0061102" lat="24.95" reskey="9093" coll="None" moddate="56112.9347222" resname="Biodiversity Research Museum, Academia Sinica, Taiwan" provname="TELDAP" catnum="061102" instcode="ASIZ">
         </lm:feature>
         <lm:feature occkey="218764804" nmkey="3227249" canname="Dasyatis bennetti" provkey="283" url="http://data.gbif.org/ws/rest/occurrence/get/218764804" geomwkt="POINT (121.900000000000006 24.94)" colldate="48151.0" lon="121.9" collcode="ASIZP0070774" lat="24.94" reskey="9093" coll="None" moddate="56112.9330208" resname="Biodiversity Research Museum, Academia Sinica, Taiwan" provname="TELDAP" catnum="070774" instcode="ASIZ">
         </lm:feature>
         <lm:feature occkey="328418149" nmkey="3227249" canname="Dasyatis bennetti" provkey="120" url="http://data.gbif.org/ws/rest/occurrence/get/328418149" geomwkt="POINT (-49.299999999999997 2.56667)" colldate="0.0" lon="-49.3" collcode="Fish" lat="2.56667" reskey="579" coll="None" moddate="56112.9325347" resname="MCZ Ichthyology Collection" provname="Museum of Comparative Zoology, Harvard University" catnum="40418" instcode="MCZ">
         </lm:feature>
         <lm:feature occkey="218796583" nmkey="3227249" canname="Dasyatis bennetti" provkey="283" url="http://data.gbif.org/ws/rest/occurrence/get/218796583" geomwkt="POINT (24.28 24.28)" colldate="52510.0" lon="24.28" collcode="NMMBP03337" lat="24.28" reskey="9095" coll="None" moddate="56112.9353588" resname="National Museum Of Marine Biology & Aquarium" provname="TELDAP" catnum="3337" instcode="NMMB">
         </lm:feature>
         <lm:feature occkey="218796584" nmkey="3227249" canname="Dasyatis bennetti" provkey="283" url="http://data.gbif.org/ws/rest/occurrence/get/218796584" geomwkt="POINT (22.579999999999998 22.579999999999998)" colldate="37101.0" lon="22.58" collcode="NMMBP06280" lat="22.58" reskey="9095" coll="None" moddate="56112.9338079" resname="National Museum Of Marine Biology & Aquarium" provname="TELDAP" catnum="6280" instcode="NMMB">
         </lm:feature>
         <lm:feature occkey="236488559" nmkey="3227249" canname="Dasyatis bennetti" provkey="283" url="http://data.gbif.org/ws/rest/occurrence/get/236488559" geomwkt="POINT (121.900000000000006 24.94)" colldate="48151.0" lon="121.9" collcode="NMMSTP00548" lat="24.94" reskey="9096" coll="None" moddate="56112.9323495" resname="National Museum Of Marine Science & Technology" provname="TELDAP" catnum="0548" instcode="NMMST">
         </lm:feature>
         <lm:feature occkey="188831702" nmkey="3227250" canname="Dasyatis bennetti" provkey="51" url="http://data.gbif.org/ws/rest/occurrence/get/188831702" geomwkt="POINT (120.510000000000005 24.28)" colldate="52510.0" lon="120.51" collcode="Occurrence" lat="24.28" reskey="1602" coll="None" moddate="56112.9307639" resname="Fishbase" provname="FishBase" catnum="NMMBA03337" instcode="FishBase">
         </lm:feature>
         <lm:feature occkey="188831703" nmkey="3227250" canname="Dasyatis bennetti" provkey="51" url="http://data.gbif.org/ws/rest/occurrence/get/188831703" geomwkt="POINT (120.290000000000006 22.579999999999998)" colldate="37101.0" lon="120.29" collcode="Occurrence" lat="22.58" reskey="1602" coll="None" moddate="56112.9291088" resname="Fishbase" provname="FishBase" catnum="NMMBA06280" instcode="FishBase">
         </lm:feature>
         <lm:feature occkey="188831704" nmkey="3227250" canname="Dasyatis bennetti" provkey="51" url="http://data.gbif.org/ws/rest/occurrence/get/188831704" geomwkt="POINT (121.879999999999995 24.949999999999999)" colldate="48151.0" lon="121.88" collcode="Occurrence" lat="24.95" reskey="1602" coll="None" moddate="56112.9275347" resname="Fishbase" provname="FishBase" catnum="NMSMP00548" instcode="FishBase">
         </lm:feature>
         <lm:feature occkey="477278619" nmkey="3227249" canname="Dasyatis bennetti" provkey="120" url="http://data.gbif.org/ws/rest/occurrence/get/477278619" geomwkt="POINT (-49.299999999999997 2.56667)" colldate="36156.0" lon="-49.3" collcode="Fish" lat="2.56667" reskey="14100" coll="None" moddate="56112.934375" resname="Museum of Comparative Zoology, Harvard University" provname="Museum of Comparative Zoology, Harvard University" catnum="40418" instcode="MCZ">
         </lm:feature>
      </lm:feature>
      <lm:fromGbif>
         True
      </lm:fromGbif>
      <lm:id>
         987159
      </lm:id>
      <lm:isCategorical>
         False
      </lm:isCategorical>
      <lm:keywords>

      </lm:keywords>
      <lm:mapFilename>
         /share/data/models/000/000/987/159/data_987159.map
      </lm:mapFilename>
      <lm:mapName>
         data_987159
      </lm:mapName>
      <lm:mapPrefix>
         /ogc?map=data_987159&layers=occ_987159
      </lm:mapPrefix>
      <lm:mapUnits />
      <lm:maxX>
         121.93
      </lm:maxX>
      <lm:maxY>
         24.95
      </lm:maxY>
      <lm:metadataUrl>
         /services/sdm/occurrences/987159
      </lm:metadataUrl>
      <lm:minX>
         -49.3
      </lm:minX>
      <lm:minY>
         2.56667
      </lm:minY>
      <lm:name>
         occ_987159
      </lm:name>
      <lm:ogrType>
         1
      </lm:ogrType>
      <lm:queryCount>
         10
      </lm:queryCount>
      <lm:title>
         Dasyatis bennetti
      </lm:title>
      <lm:user>
         lm2
      </lm:user>
   </lm:occurrence>
</lm:response>

Explanation

This example shows the XML representation of an occurrence set. Simple elements such as display name just have a text value between the start and end tags. More complex objects, such as lm:point, have data structures contained within them.