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. Anonymous
    2012-10-20T07:50:19+00:00

    I want to learn something about how to deal with data. My computer crashed last winter, and it took me a lot of efforts to recover the data. And this time, I was amost despaired, but it's lucky that I found the forum. I am a freshman in the field of computer and I am curious about anything new. But there are so many books on the shelf of the library, I don't know where to start. can you tell me the first book to read?

    Yours sincerely,

    LiuJianwei

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-10-20T07:22:54+00:00

    oh oh

    ME TOO!

      Me TOO!

    <grin>

    I am interested in the general procedure you use to find these mismatches.  Especially any tools you may be using to make it simpler to identify them.  I've looked at a few of these problem files in the past using various freeware HTML and XML editors but just didn't find one that really made it easy. 

    Typically I would manually add line breaks and indenting to match up the tags, just takes a long time to do. Especially when I guess wrong about the location.

    I know that the error point in the message indicates the "end point" of the error where the program can no longer ignore the missing tag and that I have to look forward of that point to find where the missing tag should go.

    I thought it was just missing tags, but I also found this earlier example that showed the problem could be misplaced tags, ie:

    <snip>

    Let me fix it myself

    If you are familiar with editing XML, you can try to fix the problem yourself by correcting the sequence of the mismatched oMath tags in the document. See the following example:

    Incorrect tags:

    <mc:AlternateContent>

    <mc:Choice Requires=”wps”>

    <m:oMath>

    </mc:AlternateContent>

    </m:oMath>

    Correct tags:

    <m:oMath>

    <mc:AlternateContent>

    <mc:Choice Requires=”wps”>

    </mc:AlternateContent>

    </m:oMath>

    Note: You will have to use an application such as Notepad to edit the XML.


    </snip>

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-10-20T05:42:44+00:00

    You're welcome.

    What specifically did you want to learn about? 

    Brandon

    Was this answer helpful?

    0 comments No comments