API: dmGetItemInfo

INVOKED: <server address>/dmwebservices/index.php?q=dmGetItemInfo/<alias>/<record no>/xml

EXAMPLE: https://server16614.contentdm.oclc.org/dmwebservices/index.php?q=dmGetItemInfo/linl/72/xml

The resulting XML records look like:

<title>Advertising blimp</title>
Airships; Aeronautics--Commercial; Aeronautics in advertising
<subjeb>Commercial Airport</subjeb>
<subjea>Transportation & Communication</subjea>
First blimp to land at Commercial Airport, Springfield, Illinois.
<coverb>1930s (1930-1939)</coverb>
Sangamon Valley Collection, Southwest Airport Collection, Box 2, Folder 10
United States--Illinois--Sangamon County--Springfield
<publis>Lincoln Library</publis>
Contact Lincoln Library, 327 South 7th Street, Springfield, Illinois, (217) 753-4900 for information concerning copyright restrictions applying to the use or reproduction of this image.
TIFF images created with CanoScan 9900F scanner, 300 DPI, grayscale, ArcSoft Photo Studio 5
<collec>Springfield Aviation Company Collection</collec>
<cdmfilesizeformatted>0.06 MB</cdmfilesizeformatted>

You can see where the nicknames come into play– we will need to translate these into some kind of human readable label.



$xmlData = file_get_contents('https://server16614.contentdm.oclc.org/dmwebservices/index.php?q=dmGetItemInfo/linl/85/xml');
$fieldData = file_get_contents('https://server16614.contentdm.oclc.org/dmwebservices/index.php?q=dmGetCollectionFieldInfo/linl/xml');

$sxe = new SimpleXMLElement($xmlData);

$xml = simplexml_load_string($xmlData);
$fieldData = simplexml_load_string($fieldData);

foreach ($fieldData->xpath('//field') as $record) {
        $result[] = array(
                'nick' => (string) $record->nick,
                'name' => (string) $record->name

// Find the nickname of a term, find its array index, and then find the name value at the same index

foreach ($sxe->children() as $child) {
        $str = $child->getName();
        $title = $xml[0]->{"$str"};

        if ($str == "dmrecord") { $pointer = $title; }

        $id = searchForId($str, $result);
        if (isset($id)) {
                $fieldName = $result[$id]["name"];
                echo "$fieldName: $str: $title\n";

// This function from Jacob Trunecek (http://stackoverflow.com/users/819364/jakub-trune%C4%8Dek)

function searchForId($id, $array) {
   foreach ($array as $key => $val) {
       if ($val['nick'] === $id) {
           return $key;
   return null;