the name in the end tag of the element must match the element type in the start tag error

Anonymous
2010-10-28T11:18:41+00:00

I too am having the problem many people seem to be having on this forum. I have created a fairly large and important document which includes a lot of maths equations and some graphics. Now every time I try to open it it says there is an error with a mismatch between the start and end tags. I have never worked with XML but have tried to find what feels like a needle in a haystack and can't really see how to proceed. Is there any chance you could help? I have uploaded the document to:

http://www.sendspace.com/file/0ecfpu

Many thanks,

Andrew

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2010-11-01T19:04:17+00:00

Hi Andrew,

The fixed file is at http://www.wordarticles.com/temp/AH%20Statistics%201%20Notes%20-%20Outcome%202.docx

To try to answer your questions:

There is no easy way to do it in Notepad - I generally use Visual Studio; Yves Dhondt - the only other person here, AFAIK, who fixes these documents - has some tool he wrote himself. It isn't very difficult but there is no guarantee of what you will find when you look. Usually - and I'm sure you're right - it happens when equations and graphics are together and an oMath end tag, and perhaps part of the equation it ends, gets misplaced within a structure that is meant to enable the equation be correctly displayed in earlier versions of Word that do not support the new equation engine.

The structure should be:

<mc:AlternateContent>

<mc:Choice>

<m:oMath>

Start of equation

End of equation

</m:oMath>

<mc:Choice>

<mc:Fallback>

Probably some graphics

</mc:Fallback>

</AlternateContent>

but ends up as:

<mc:AlternateContent>

<mc:Choice>

<m:oMath>

Start of equation

<mc:Choice>

<mc:Fallback>

Probably some graphics

</mc:Fallback> </AlternateContent>

End of equation

</m:oMath>

This is a bug so nothing is for certain, and I don't know what circumstances trigger it, or what you can do to avoid it. I also don't know if Microsoft are working on it, although I have informed them and they have replied that 'it has been passed to the appropriate team' or some such.

For my own amusement I am working on an AddIn that will attempt to mend these documents but I don't know how well it will work, yet.


Enjoy,

Tony

www.WordArticles.com

Was this answer helpful?

8 people found this answer helpful.
0 comments No comments

207 additional answers

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 323.6K Reputation points MVP Volunteer Moderator
    2016-05-08T21:58:36+00:00

    Re-read my response, paying particular attention to the punctuation.

    I received the information about the changes in a private communication.

    I was interested in learning IF the Eject facility was used, was it either versions 15 or 16 that was in use as the information that I had received implied that saving to a USB stick should NOT result in the document becoming corrupted.

    Regardless, I would continue to recommend that documents not be opened from, or be saved to, any form of removable media.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-05-08T17:40:02+00:00

    Unfortunately, the USB was not safely removed/ejected from the computer. Does this mean you were unable to recover the document?

    Correct.

    When a USB is unplugged without using "safely remove" most (not all) of the time part of the file is left behind on the computer.  That part of the file can no longer be "attached" to the original file.

    Why use “Safely Remove” function

    http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B328856


    http://social.answers.microsoft.com/Forums/en-US/wordcreate/thread/73a1e1b0-e6cf-43b8-a97f-0b01b5c33da3/ 


    This discussion is primarily about missing XML tags, but on page 2 it also discusses the effects of pulling USB devices without stopping them correctly

    http://word.tips.net/T000132\_Dont\_Work\_Off\_Floppies.html


    Why you should/must the “Safely Remove” function requires a bit of a historical and technological review.

    The first “USB” drives used “Flash” memory chips with storage of 16/32/…/256 KB (NOT MB or GB!) rather than “normal” old school spinning hard Drives. Current techlogy has extended flash type drives to 256GB (and still growing). I still have my first thumb drive, which cost $75 for 256KB of space. You can now get around 1TB of USB spinning disk external USB storage for that price <grin>. Technological growth has expanded the “USB Drive” definition to include external portable spinning disk type drives with up to 3TB in storage space (and also growing).

    Writing / saving files to USB Flash storage is not a clear cut simple “save” operation due to technological limits of the flash device.  Flash memory has a finite number of write operations before it fails. Writing to flash memory is done a whole “block” at a time. So even if you need to write a single “byte” to a block, the whole block is written, “burning up” a write operation to that block. To minimize “wasting” write operations Windows drivers for USB devices has been designed to stage “writing” to the USB device through a “cache” file on the local HD.  When a full block, or multiple of full blocks of file is ready to write to the flash drive it is all sent.  Partial blocks of information are “left” in the cache. Therefore, even though you have “saved” a file to the flash drive “only”, the tail end of the file may still only reside in the cache in the local. Unfortunately, the “new” Word DOCX format files are structured so that the body text of your document is located at the logical and physical end of the file. If that last block is “lost” even though most of the DOCX file structure is on the flash drive, the most important part, your body text, could be lost. “Left behind” on the computer local HD. OOPS!

    I do not know if the write cache is still used for USB spinning disk devices.

    So that defines the first part of the problem. Why we NEED to use the “Safely Remove” function.

    The second part of the problem is why does “Safely Remove” sometimes fail?

    This failure happens because of how some programs are written. They take “hidden” file open locks when users do not expect it. And sometimes the program does not properly release the file open lock even after it no longer needs it.  An example of a hidden/unexpected file open lock is using the preview function to display a thumbnail image of the file in tools like File Explorer.

     “Safely Remove” is designed to “flush” the cache, writing all remaining file “tail ends” to the flash drive. It is not written to force applications with file open locks to close. And, unfortunately, it STILL (after too many years) has not been enhanced to list the programs that have file open locks on the USB device <hint hint MS!>. It is a simple enough change, Windows does know, so it is simple enough to program the utility to identify and list these programs.

    ********************

    Files are not always corrupted for 2 reasons.  Sometimes the flash drive is pulled after the file has been fully saved, so nothing is lost.  Sometimes, the computer is setup to not need the "safely eject" step. This is a custom setting so it is rarely turned on.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-05-08T16:06:36+00:00

    Unfortunately, the USB was not safely removed/ejected from the computer. Does this mean you were unable to recover the document?

    Was this answer helpful?

    0 comments No comments