
CHAPTER 10: Scripting Access to XMP Metadata XMPScript object reference 273
There is one static property on the class that provides XMP version information; there are no JavaScript
properties in the instance. The object encapsulates a set of metadata properties, which you access
through the object functions.
The generic functions getProperty()
, setProperty(), and deleteProperty() allow you to manipulate all types
of properties, when used with appropriately composed path expressions. For convenience, the object also
provides more specific functions for use with specific types of properties, such as arrays.
XMPMeta object constructors
To create an XMPMeta object, use the new operator. The constructor accepts an RDF/XML serialized
metadata packet as a string, or as an array of numbers that contain only byte values. It returns the new
object. If no argument is supplied, the new object is empty; you can use the object’s functions to add
namespaces and properties.
The first call to any of these constructors initializes the library by registering the standard namespaces and
aliases.
new XMPMeta ( ); // creates an empty object
new XMPMeta ( packet );
new XMPMeta ( buffer );
XMPMeta class properties
The XMPMeta class provides this static property. It is not necessary to create an instance to access it.
XMPMeta class functions
The XMPMeta class provides these static functions. It is not necessary to create an instance to call them.
packet
A String containing an XML file or an XMP packet.
buffer
An Array of Number. The UTF-8 or UTF-16 encoded bytes of an XML file or an XMP packet.
This array is the result of
XMPMeta.serializeToArray().
version
String The descriptive string for this version of the XMP Toolkit.
deleteAlias()
XMPMeta.deleteAlias (aliasNS, aliasProp)
aliasNS
The namespace URI string. See “Schema namespace string constants” on
page 262.
aliasProp
The alias property string.
Deletes the specified alias; does not delete the aliased property. If the alias does not exist, does
nothing.
N
OTE: Not yet implemented in the XMP Toolkit.
Returns
undefined.
Comentarios a estos manuales