The bookcontainer (Edit-type plugin) object--usually represented "bk" in a plugin--has get|setmetadataxml() methods that can retrieve and set the xml portion of the opf file that deals wirh metadata. There's no need to parse the entire opf to get/set metadata.
bk.getmetadataxml()
parse metadata
meta = rebuilt metadata xml fragment
bk.setmetadataxml(meta)
Last edited by DiapDealer; 12-14-2015 at 09:44 AM.
|