Found solution at https://ww.wp.xz.cn/support/topic/xml-parsing-error-xml-or-text-declaration-not-at-start-of-entity-1?replies=6
Apparently caused by blank lines outside of <? and ?> bracketed section(s) in the theme’s functions.php file
Removing the blank lines solved the problem. Many thanks to DigitalPresences
Similar problem — sitemap not generated, get error msg:
This page contains the following errors:
error on line 4 at column 6: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.
[and the page below is empty]