If you haven't already done so, install the "Writer2LaTeX
" extension in Libre Office. Then, use the Writer2xhtml export filters included in that extension to export clean xhtml or even an epub directly.
Additionally, in your LO document, be sure to use defined styles rather than "direct formatting" -- that is, define a paragraph style and apply it to the paragraphs. Define a character style for bold, italic, etc, and apply them to the bold, italic, etc. text. (You can do this via search and replace.)
Doing so will greatly simplify the xhtml code.