I am working on a CEP extension for InDesign which creates a new document that has some custom XMP in it. I'm using the `lib:AdobeXMPScript` object to create the XMP in a temporary xml file on disk, and then importing it with `doc.metadataPreferences.append()`.
I can read this back in by constructing an `XMPFile` object passing in my document's save path. But sometimes I may need to do this before the document is saved.
Is there any way to get the raw XMP data from an open InDesign document without saving it first? Alternatively, is there any way to read complex structures in custom namespaces using the InDesign XMP functionality in `MetadataPreference`? My attempts to do this so far have failed... I just always get no results when I try to read them.