Originally Posted by kkg58
okay. I managed to fix it by letting Sigil do it automatically. And now I am able to insert the rest of the chapter breaks that I need to put in. But why did I have an error to begin with? I'm just worried that I'm doing something wrong with the files.
Without seeing actual code (and it's apparently a very big file, so I'm not asking to see it), I can only guess. Remember that a parser like Sigil's can get confused when trying to match tags, and so the reference to the <body> tag might be misleading. It could be that somehow your cursor was positioned inside of some tag when the chapter break was inserted, thus breaking up the tag.
Anyway, glad you got it sorted out. If it happens again (the not-well-formed warning) you could choose "fix manually" and try to see what looks funny in the code.