Hello,
you have to use doc.exportPublishProfile which writes an xml file
you have to edit this file (this can be done via RegExp or E4X) and
add your classpath and after use doc.importPublishProfile to update
your document publishProfile.
hopes that help.
François.