I am trying to read XMP metadata of an indd file using CS Extension Builder in Flash Builder 4.5.
The documentation has many class like XMPmeta, XMPStruct, etc.
I have got the currently opened document in InDesign as follows:
var myDoc:Document = InDesign.app.activeDocument();
And a new XMPmeta object is created as follows:
var myXMP:XMPMeta = new XMPMeta();
How to initialize document's xmp metadata in the XMPMeta object? Or is there any other way to get the XMP metadata of currently opened document in InDesign?
I have found that the XMP data of an InDesign document can be retrieved in actionscript as follows:
This returns the MetadataPreference object.
But I am not able to iterate each namespace in the xmp. There isn't any XMPFile class which allows me to serialize the object to xml file so that I can iterate all elements in the XMP.
I could not relate class like XMPMeta, XMPProp, etc. with the MetaDataPreference class. So, how to obtain the entire xmp packet from the MetadataPreference object?
Can anyone shed light on this?