bk.getmetadataxml() returns a utf-8 encoded xml fragment from <metadata> to </metadata>.
bk.setmetadataxml() expects a similar utf-8 encoded xml fragment in return.
All the processing that happens in between those two events is entirely up to you. But neither serialize_xhtml() nor sigil_bs4's xhtml parser in general, would be a wise choice, in my opinion, for processing the data. Considering that the opf file and the resulting metadata fragment is not, in fact, xhtml.
Last edited by DiapDealer; 08-04-2019 at 12:35 PM.
|