The ActionScript XMP Library is intended to be used with Adobe Flash and Flex technology, to read, modify and create XMP packets in the RDF/XML format.
This library is an ActionScript 3 implementation of the C/C++ XMPCore library. It is written entirely in ActionScript 3 and and has no other dependencies. The XMPCore library is the component that is used to manipulate the contents XMP Packets using the XMP Data Model; it does not deal with how XMP Packets are embedded in files.
XMP metadata is represented in memory as an object tree that reflects the XMP data model, as describedin the XMP Specification: Part 1, Data and Serialization Models. The XMPCore ActionScript Library allows Direct Access to every node of the tree. The root node represents the XMP Packet itself. Each tree node represents an XMP property. Properties can be simple (key-value pairs) or complex (structures). Complex properties can be nested to any depth; that is, stuctures or arrays can contain other structures or arrays.Properties can have qualifiers that describe their values; for example, the xml:lang qualifier contains the language associated with each item in an alternative text array.
You can use the API functions to iterate the nodes recursively, in order to traverse the complete tree if needed. The library assures that the data tree is always in a valid state and can therefore be serialized into a well-formed XMP Packet at any time. If you use an API function incorrectly, the library throws an exception.
The library comprises three main parts:
* The data model represents a set of XMP data in memory. The API allows you to create, modify, or delete XMP properties.
* The parser reads an XMP packet in RDF/XML format into the data model in memory.
* The serializer converts the data model into RDF/XML format.