Perl SDK Module: ZoomMetadata

Name

ZoomMetadata – Helper methods to parse zoom metadata specification

Dependencies

Ensure the Perl SDK is setup.

Synopsis

use ZoomMetadata;
my $status = ZoomMetadata::loadXML(); 

Methods

loadXML

Usage: loadXML()

Loads metadataspec.xml. Returns 1 on success and 0 on failure to load the xml

find

Usage: find($xpath)

Given a xpath(XML Path) as input, returns a hash map of values pertaining to the xpath from metadataspec.xml

find('/metadataspec/metadatagroups/mdgroup[@code="FIPR"]/metadataFields/field[@name="ColorMode"]/values/option/@value')
Output hash_ref: {"Bitmap"=>1,
                  "Gray scale"=>1,
                  "Indexed colour"=>1,
                  "RGB"=>1,
                  "CMYK"=>1,
                  "Multi-channel"=>1,
                  "Duotone"=>1,
                  "Lab color"=>1}

Leave a Comment