No you need to tell lxml to use an xml parser and an xml serializer with bs4.
Check out Sigil/src/Resource_Files/python3lib/xmlprocessor.py for examples.
For example: performOPFUpdates in that file show how to use an xmlbuilder to parse pure xml for bs4 and how to serialize it back using decodexml.
Last edited by KevinH; 08-04-2019 at 03:44 PM.
|