1 person found this helpful
You can use InDesign's own XMP objects/properties/methods. (History note: we developed our own XMP tools early on, before the ExtendScript XMP library was available.) Do you want to change the metadata for an InDesign file, or look at the metadata for an imported element in an InDesign document?
If the former, you use the metadataPreferences object on the document itself (several examples in the Documents chapter of the Scripting Guide demonstrate the use of this object); if the latter, you use the metadataPreferences object on the itemLink element of the imported graphic.
By design, InDesign can't change the XMP of an imported graphic, so you'd still have to do that outside InDesign.
Thanks. It's funny, I had actually already come across that exact post of yours while researching this question.