I found the same issue on a few topics. For me things were fixed by using the context menu on the topic TOC entry to "Edit Caption".
After making changes to the caption, saving then syncing to my SVN I noticed quite a few topics being updated, after which the error went away.
I just thought I'd share that in case anyone else comes across this.
Unfortunately, I'm not sure what action Paul is recommending -- is the "context menu" the one that pops up upon right-click on the topic? I don't have a caption and I don't see an option to Edit Caption.
This is a known issue and is actually easy to correct. You will also see this in uncompressed projects. What happens is that in some rare cases a copy of some TOC entries is inserted incorrectly after the closing </map> tag in the main TOC file when you do copy and paste operations with the mouse between multiple TOCs. Unfortunately we have never been able to reproduce it ourselves, so it hasn't been possible to debug it yet.
Here is how to fix it:
If the project isn't saved in uncompressed HMXP format select Save As... in the File menu and save it uncompressed in an empty folder.
Open the main TOC file (the one without a number) in the \Maps folder in a code editor like Notepad++ and search for the FIRST closing </map> tag.
If there are any lines of code after that tag DELETE them all and save.
Repeat 2 and 3 for all other TOC files just to be sure.
Open the repaired project and check through the TOCs
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Unfortunately, we don't have anything text or code after the first (and only) </map> tags either in the un-numbered table_of_contents.xml or the only alternate, table_of_contents1.xml.
Another possible cause of this is that you are managing your project in SVN and the version control system didn't complete its merging and diffing procedures cleanly. When this happens it leaves its placeholders between the regular XML tags and the check for XML well-formedness then fails. You can usually fix this by opening the affected topics in Help+Manual, making any small change and then saving. HM will then automatically eliminate anything not in the XML schema.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Dave Gehman wrote: ↑Mon Mar 01, 2021 4:16 pm
Meanwhile, where does the 'check for XML well-formedness' happen? In SVN/GIT or in H+M?
HM checks every topic when it opens it and when it saves it. However, any XML-aware system will also perform this check before manipulating the XML. When it tries to read HM topics, for example, it would check everything it does against the .xsd file containing the HM XML schema, that is included in every HM project.
(Probably of no importance around your answer -- we use GIT -- but the updating problem may likely be the issue.)
It will either be that or something else external that has left something in the XML that shouldn't be there. In most cases it will be very obvious if you look at the XML topic files in an editor. There will be stuff between the tags that clearly doesn't belong there.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Thanks. We -- mere authors, not version control experts -- are scouring our company for someone who knows GIT and can help us out. Your answers (hopefully) will be pushing us in the right direction(s)...